tags:

views:

112

answers:

4

I have already heard about the curl library, and that I get interest about...
and as i read that there are many uses for it, can you provide me with some

Are there any security problems with it?

+2  A: 

one of the many useful features of curl is to interact with web pages, which means that you can send and receive http request and manipulate the data. which means you can login to web sites and actually send commands as if you where interacting from your web browser.

i found a very good web page titled 10 awesome things to do with curl. it's at http://www.catswhocode.com/blog/10-awesome-things-to-do-with-curl

ufk
A: 

It certainly can simplify simple programs you need to write that require higher level protocols for communication.

I do recall a contractor, however, attempting to use it with a high load Apache web server module and it was simply too heavy-weight for that particular application.

PP
+1  A: 

One of it's big use cases is for automating activities such as getting content from another websites by the application. It can also be used to post data to another website and download files via FTP or HTTP. In other words it allows your application or script to act as a user accessing a website as they would do browsing manually.

There are no inherent security problems with it but it should be used appropriately, e.g. use https where required.

cURL Features

Turnkey
A: 

It's for spamming comment forms. ;)

cURL is great for working with APIs, especially when you need to POST data. I've heard that it's quicker to use file_get_contents() for basic GET requests (e.g. grabbing an RSS feed that doesn't require authentication), but I haven't tried myself.

If you're using it in a publicly distributed script, such as a WordPress plugin, be sure to check for it with function_exists('curl_open'), as some hosts don't install it...

redwall_hp