Need help with cURL

software development


i need to convert this into curl:

say(‘Download in progress’);

say(“Downloading games.sql”);

$xmlParser = new XMLParser(file_get_contents(‘’));

foreach ($xmlParser->document->game as $game)
$thumbfile = urlencode(trim($game->thumb[0]->tagData));
$gamefile = urlencode(trim($game->remote_url[0]->tagData));
say("Downloading: [ $totalGames ]: “.$gamefile.” & ".$thumbfile);
say(“fin… running bigdump.php”);

whenever I open up the php file it says there is an error:
URL file-access is disabled in the server configuration.

Thanks i f you can convert the script into cURL.



if is your site (which it doesn’t look like based on your script), you should just access the files using the linux path instead of over http.

here’s how to get the contents of a file from a different site into a variable using curl:

<? $curl = curl_init(''); curl_setopt($curl, CURLOPT_HEADER, 0); // ignore any headers ob_start(); // use output buffering so the contents don't get sent directly to the browser curl_exec($curl); // get the file curl_close($curl); $xml = ob_get_contents(); // save the contents of the file into $xml ob_end_clean(); // turn output buffering back off ?>
track7 - my dream-hosted site