You need initialize a new curl resource by:
Then set the url to fetch:
Quote:
|
curl_setopt($ch, CURLOPT_URL, 'http://www.xxx.com');
|
If you want to return the value instead of printing the response to browser:
Quote:
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
and:
Quote:
|
$content = curl_exec($ch);
|
Please condider:
PHP: CURL - Manual
Good luck