emc2k99 Posted November 7, 2006 Share Posted November 7, 2006 ???[code]<?php $x='sourceid=navclient-ff&ie=UTF-8&rlz=1B2GGGL_enUS177&q=tube+socks'; //$x = 'p=tube+socks&fr=yfp-t-501&toggle=1&cop=mss&ei=UTF-8';//$x='fr=FP-pull-web-t';//$x='';$f=fsockopen('www.google.com',80,$errno,$errstr,30); if(!$f) { echo "Socket error #$errno: $errstr"; } else { $wr="GET /search HTTP/1.1\r\nHost: www.google.com\r\n";$wr.="Location: www.google.com/search?sourceid=navclient-ff&ie=UTF-8&rlz=1B2GGGL_enUS177&q=tube+socks";//$wr="Allow: GET, HEAD, PUT\r\n";$wr.="Content-Type: application/x-www-form-urlencoded\r\n";//$wr.="Content-Type: */*\r\n";$wr.="User-Agent: Firefox 2.0\r\nContent-length: ";$wr.=strlen($x)."\r\nConnection: close\r\n\r\n$x";fputs($f,$wr); while(!feof($f)) { echo fgets($f,(1024 * 50)); } fclose($f); } ?> [/code]Trying to figure out what I'm doing wrong with this, basically trying to pull up the search results... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.