preCharge Forums - View Single Post - Using Curl except file_get_contents
View Single Post
Old 04-07-2008   #2 (permalink)
vn4000
Junior Member
 
Join Date: Apr 2008
Posts: 12
Default Re: Using Curl except file_get_contents

You need initialize a new curl resource by:
Quote:
$ch = curl_init();
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
vn4000 is offline   Reply With Quote

 
Debt Consolidation | Auto Loans | Auto Loans | Mobile Phones | Online Advertising