how to use curl in php





Once you've compiled PHP with cURL support, you can begin using the cURL functions. The basic idea behind the functions is that you initialize a cURL session using the (), then you can set all your options for the transfer via the (), then you can execute the session with the () and then you finish off your session using the (). Here is an example that uses the cURL functions to fetch the example.com homepage into a file: