PHP problem PHP
The
uses both curl and file_get_contents to get the content, replacing the URL, as follows:
!--? Phpfunction getwebcontent ($url) {$ch = Curl_init (); $timeout = 10; curl_setopt ($ch, Curlopt_url, $url); curl_setopt ($ch, Curlopt_returntransfer, 1); curl_setopt ($ch, Curlopt_connecttimeout, $timeout); curl_setopt ($ch, curlopt_followlocation, 1); $contents = Trim (curl_exec ($ch)); Curl_close ($ch); return $contents;} $temps = ' http://127.0.0.1:50/admin/process_get.php?k=get&s=11&i=12367&url=www.100.com '; $chS =file_get_contents ($temps); $chS =getwebcontent (' http://127.0.0.1:50/admin/process_get.php?k=get&s=11&i=12367&url=www.100.com '); Echo $chS;? -->
My remote URL http://127.0.0.1:50/admin/process_get.php?k=get&s=11&i=12367&url= Www.100.com is accessible, content is 77788899
But through curl and file_get_contents to get this URL can not get content, causing the server to die, the above URL is replaced by other URLs, everything OK!
The boss said, this problem will not be solved, tomorrow will not let home the New Year, please help to see!!!