a week ago 2 kind persons suggested me to use fread to read a result page.
i've been working for it but just can't get what i want.
$keyword ="big problem";
$startfig = rand(0,60);
//$theFile
="http://images.google.c om/images?q=\"".$k eyword."\"&star t=".$startfig ;
//$theFile
="http://images.google.c om/images?q=\"".$k eyword."\"&star t=".strval($sta rtfig);
$theFile ="http://images.google.c om/images?q=acd";
if (($f = fopen($theFile, 'r')) === false) exit;
$contents = fread($f, (9*(1024*1024)) );
echo "$contents" ;
fclose ($f);
$matchno = preg_match_all( "/.*<img src=/images?q=tbn:.* :(.*)
width=.*>.*/", $contents, $regs);
$imgurl = $regs[rand(0,$matchno-1)];
why can't i retrieve the result obtained from google image search?
i've been working for it but just can't get what i want.
$keyword ="big problem";
$startfig = rand(0,60);
//$theFile
="http://images.google.c om/images?q=\"".$k eyword."\"&star t=".$startfig ;
//$theFile
="http://images.google.c om/images?q=\"".$k eyword."\"&star t=".strval($sta rtfig);
$theFile ="http://images.google.c om/images?q=acd";
if (($f = fopen($theFile, 'r')) === false) exit;
$contents = fread($f, (9*(1024*1024)) );
echo "$contents" ;
fclose ($f);
$matchno = preg_match_all( "/.*<img src=/images?q=tbn:.* :(.*)
width=.*>.*/", $contents, $regs);
$imgurl = $regs[rand(0,$matchno-1)];
why can't i retrieve the result obtained from google image search?
Comment