I have this field Returned by curl_exec:
<input name="NUMBER_R" type="hidden" value="1500000">
150000 is a random number and may change the others are constant
i tried:
preg_match ('/<input name="NUMBER_R" type="hidden" value="([^"]*)" \/>/', $result, $number)
and also:
preg_match ('/<input name=\'NUMBER_R\' type=\'hidden\' value=\'(\\d+)\'>/ims', $result, $number)
but no luck...
Here is the full code:
$result=curl_exec($cid);
curl_close($cid);
$number = array();
if (preg_match ('REGEX', $result, $number))
{
echo $number[1];
}
EDIT 1: Sorry i forgot [1] in echo $number[1]; Also 1500000 is a random number and may change