function returnvalue($namearr,$exec){
$result="";
foreach($namearr as $arr => $value) {
$regex = '<.* name="'. $value .'".*>';
if (preg_match($regex,$exec,$result1) === false) {
$result4=" FALSO OFFSET MORE HIGHER THAN SUBJECT " . "<br />";
} else if (preg_match($regex,$exec,$result1) == 0) {
$result4=" VOID" . "<br />";
} else {
preg_match('/value="[\w]+"/i',$result1[0],$result2);
$result3 = preg_replace('/value="/i',"",$result2[0]);
$result4 = substr($result3,0,-1);
}
$result.= $value." : ".$result4 . "<br />";
}
return $result;
}
Bad to read, but let's get down to business.
$ exec : <input name="fb_dtsg" value="AQHF4anP9ASw" autocomplete="off" type="hidden">
$ namearr receives: fb_dtsg
I returned the correct value.
It turns out that here is something like: mag_glass , in fact, the expected return is: fb_dtsg
actually only returns something totally different, in fact, what return does not exist no AQHF4anP9ASw
.
I think it's a return of $exec
, but I tried to find out more about mag_glass and found nothing.
Obs1: $ exec gets more stuff than what I've shown here, but for organization purposes I put only the part that matters.
Obs2: I did the test by hand with regexr, to see if it got to the correct value, and arrived, but in this function only for the name fb_dtsg the value is different ..