The curl_init() will initialize a new session
and return a CURL handle for use with the
curl_setopt(), curl_exec(),
and curl_close() functions. If the optional
url parameter is supplied then the
CURLOPT_URL option will be set to the value of the parameter.
You can manually set this using the
curl_setopt() function.
Example 1.
Initializing a new CURL session and fetching a webpage
<?php // create a new curl resource $ch = curl_init();
// set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "http://www.example.com/"); curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser curl_exec($ch);
// close curl resource, and free up system resources curl_close($ch); ?>
curl init php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php curl init syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.