You are here: fread usage « PHP Programming Language « IT news, forums, messages
fread usage

Posted by vito on 05/04/06 13:51

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.com/images?q=\"".$keyword."\"&start=".$startfig;
//$theFile
="http://images.google.com/images?q=\"".$keyword."\"&start=".strval($startfig);
$theFile ="http://images.google.com/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?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация