News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Using cURL for Remote Requests
August 08, 2013 @ 09:09:13

PHPMaster.com has posted a tutorial showing you how to use the cURL functionality that can be built into PHP. Note that not all PHP installations will have this extension installed, but most will these days. You can find out by making a phpinfo page.

If you're a Linux user then you've probably used cURL. It's a powerful tool used from posting mails to downloading the latest My Little Pony subtitles. In this article I'll explain how to use the cURL extension in PHP. The extension offers us the functionality as the console utility in the comfortable world of PHP. I'll discuss sending GET and POST requests, handling login cookies, and FTP functionality.

He walks thorough the basic flow of a request and how to set options on the cURL handle to modify its behavior. Several more "real world" examples are also included:

  • Retrieve a Web Page
  • Log in to a Website (via POST data, not HTTP Auth)
  • Working with FTP
  • Sending Multiple Requests

That last one changes things up a bit and uses the curl_multi_init function to create the connection and allow for the multiple request streams to happen.

0 comments voice your opinion now!
curl remote request tutorial login ftp multiple

Link: http://phpmaster.com/using-curl-for-remote-requests

blog comments powered by Disqus

Similar Posts

Michael Girouard's Blog: Rolling Your Own MVC: The View

Felix Geisendorfer's Blog: Two Tutorials - Title to Slug & Dependencies with If

Zend Developer Zone: Leveraging Zend Framework Components from Adobe Flash Platform Applications

php|architect: Using PHP5's SOAP Support

Zend Developer Zone: Generating and Validating Web Forms With PEAR HTML_QuickForm


Community Events











Don't see your event here?
Let us know!


facebook framework hack package podcast hhvm install composer release threedevsandamaybe security opinion introduction component language symfony2 application code overview unittest

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework