TuQuoQueBrute Posted March 29, 2013 Share Posted March 29, 2013 Hi all With this code bellow: i only get the response "HTTP/1.1 200 OK" i want to get all the response from the website , any clue how to do this? Regards <?php $aa='google.com'; $ab="GET / HTTP/1.1\n"; $ab .="Host: www.google.com\n"; $ab .="Connection: keep-alive\n"; $ab .="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n"; $ab .="User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22\n"; $ab .="Accept-Encoding: gzip,deflate,sdch\n"; $ab .="Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4\n"; $ab .="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3\n\n"; $a=fsockopen($aa,80); fputs($a,$ab); $b=fgets($a); echo $b; ?> Link to comment https://forums.phpfreaks.com/topic/276302-problem-getting-page-content/ Share on other sites More sharing options...
devWhiz Posted March 29, 2013 Share Posted March 29, 2013 Try using curl(). Link to comment https://forums.phpfreaks.com/topic/276302-problem-getting-page-content/#findComment-1421872 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.