cURL libcurl PHP Examples|
PHP/CURL Examples Collection
We try to collect examples on how to program the PHP/CURL interface
here. If you have any source snippests you want to share with the rest of the
world, please let us know!
Post a blog entry to blogger.com using their "Atom" XML-based API.
|| Michael Phipps|
Set callback functions to receive the HTTP response as it comes through.
Login to on one page and then get another page passing all cookies from the
first page along
CURLOPT_CUSTOMREQUEST usage shown
Mimics a browser and logs in to ebay
FTP upload to a remote site
Get the contents of a web page as a binary into a php variable.|
Get the contents of a remote web page into a PHP variable
This code posts all the correct post fields to Googles universal Account
Services login and brings the user directly to the AdSense Overview
page. Cookies are used in this example as well as setting the USER AGENT and
REFERRER HTTP headers.
Shows how to submit and upload a file to a HTML upload form.
Check for a given link in a remote page
Shows how to fetch several documents at once by using the multi interface
Using a multipart/form-post file upload form on a web page.
Perform a HTTP PUT to a remote site
Download a remote image, resize it and show it to the user
Follow your Adsense earnings with an RSS reader
Get a URL
Basic HTTP POST operation
The simpleget.php ExampleGet a URL
// A very simple example that gets a HTTP page.
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, "http://www.zend.com/");
curl_setopt ($ch, CURLOPT_HEADER, 0);