Simple cURL example in PHP 
<?php

/*
We'll get the content of a remote page to display locally ;)
*/

$curl=curl_init();
// Set some options - we are passing in a useragent too here
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'http://www.televisa.com/us/',
CURLOPT_BINARYTRANSFER=>true,
));

// Send the request & save response to $resp
$resp = curl_exec($curl);

// Close request to clear up some resources
curl_close($curl);

echo $resp;

?>

[ view entry ] ( 1588 views )   |  print article

<<First <Back | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Next> Last>>



2024 By Angel Cool