Return to Snippet

Revision: 4212
at November 7, 2007 17:57 by iloveitaly

Initial Code
function file_get_contents_curl($url) {
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_HEADER, 0);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
	curl_setopt($ch, CURLOPT_URL, $url);
	$data = curl_exec($ch);
	return $data;

Initial URL

Initial Description

Initial Title
CURL replacement for file_get_contents

Initial Tags
curl, php

Initial Language