Skip to content

Instantly share code, notes, and snippets.

View file_get_contents_curl.php
<?php
// http://25labs.com/alternative-for-file_get_contents-using-curl/
function file_get_contents_curl($url, $retries=5)
{
$ua = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)';
if (extension_loaded('curl') === true)
{