Hi, i have this code, but it doens't seem to work...
#!/usr/bin/perl
print "Content-type: text/html \n\n";
$path = "search?hl=en&lr=&safe=off&q=foo+bar";
$fp = fsockopen("www.google.com",80,&$errno,&$errstr,10000);
fputs($fp, "GET $path HTTP/1.1\n");
while(!feof($fp)) {
$searchresults .= fgets($fp, 128);
}
fclose($fp);
print $searchresults;
I am a newbie. i want to load an entire url into a variable.. HOW???