Login To InderWeb ! Just Play !

Username:
Password:

UserSubmittedComments

What is curl and how to use it in a PHP code file.

curl is the client URL function library that enable you able to make live requests and getting data or result from live resources and much more.. PHP supports it through libcurl. To enable support for libcurl when installing PHP add --with-curl=[location of curl libraries] to the configure statement before compiling. The curl package must be installed prior to installing PHP. Most major functions desired when connecting to remote web servers are included in curl, including POST and GET form posting, SSL support, HTTP authentication, session and cookie handling.

To start a curl session use the curl_init() function. Options for the curl session are set via the curl_setopt() PHP function. Once you have the options set execute the request with the curl_exec() function.