I discovered libcurl a long time ago, but never really worked with… until yesterday! It was during a Solaris course, my classmate showed me some stuff he did with libcurl, and I was amazed of the capabilities! On the evening I jumped onto my macbook and wrote a class to manage cURL requests.
My main utilization is to get quickly, and in an automatic manner, information on my accounts in some websites (such as social networks, affiliation programs or banks – yes, libcurl handle HTTPS!) and why not retrieving all of that in a widget.
Just download the class file, include it in your project and you’re good to go: cURL class
$curl = new Curl(1);
// We pass variables in POST
// Connection to facebook, a cookie is created and stored in a file
// Now we can get a page as a logged user
$t = $curl->exec('http://www.facebook.com/profile.php');
// And do what we want with the result ...
// generally parsing it with regular expressions
That’s all folks!