Filtri Menu 0 0.00

PHP cURL

PHP cURL
// initialize cURL
$ch = curl_init();

//  set the URL of the remote resource to download
curl_setopt($ch, CURLOPT_URL, 'http://www.site.com/index.html');
//set url as curl_init() parameter --> $ch = curl_init('http://www.site.com/index.html');

// required that no headers be downloaded
curl_setopt($ch, CURLOPT_HEADER, 0);

// prevent remote content from being passed to print
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// set the timeout to 10 seconds
curl_setopt($ch, CURLOPT_TIMEOUT, 10);

//  run the call and save the result in a variable
$output = curl_exec($ch);

// close cURL
curl_close($ch);

 

Condividi:

Iscriviti alla newsletter

Iscriviti alla nostra newsletter per ricevere offerte di sconto anticipate, aggiornamenti e informazioni sui nuovi prodotti.
Top