ti_nhatrang
09-22-2009, 04:36 PM
Hi guys,
Am trying to have my script run the codes I have individually and out put me the ones that has the word "patent", and if it doesn't, then skip it or something, please help... am almost done with my project.
<?php
$code=”011869,0118658,011654";
$dp = "http://www.google.com/search?hl=en&source=hp&q="$code[]"
$sp = @file_get_contents($dp);
if ($sp === FALSE) {
echo("<P>Error: unable to read the URL $dp. Process aborted.</P>");
exit();
}
preg_match_all("(Patent)", $sp, $content);
foreach($content[0] as $route) {
echo $code,'<br />';
}
?>
Am trying to have my script run the codes I have individually and out put me the ones that has the word "patent", and if it doesn't, then skip it or something, please help... am almost done with my project.
<?php
$code=”011869,0118658,011654";
$dp = "http://www.google.com/search?hl=en&source=hp&q="$code[]"
$sp = @file_get_contents($dp);
if ($sp === FALSE) {
echo("<P>Error: unable to read the URL $dp. Process aborted.</P>");
exit();
}
preg_match_all("(Patent)", $sp, $content);
foreach($content[0] as $route) {
echo $code,'<br />';
}
?>
