• I just updated to 3.0 and I am not getting the following error

    Warning: file_get_contents(https://www.gearupandplay.com/inc-bans-header2.php) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/mfalk75/public_html/shop/themes/BANS BP DAILEY/header.php on line 29

    ANy clues, everything was good before the upgrade.

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mfalk75

    (@mfalk75)

    I didn’t mean to say I am not…I meant to say I am getting the following error. Can anyone help, my site is broke. thanks

    Thread Starter mfalk75

    (@mfalk75)

    nobody?

    Try this alternative to file_get_contents:

    function curl_get_contents($url)
    {
    	$result = false;
    	$url = str_replace(' ', '%20', $url);
    	$curl = curl_init($url);
    
    	if (is_resource($curl) === true)
    	{
    		curl_setopt($curl, CURLOPT_FAILONERROR, true);
    		curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
    		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    		curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    
    		$result = curl_exec($curl);
    		curl_close($curl);
    	}
    
    	return $result;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘file_get_contents error after 3.0 Upgrade’ is closed to new replies.