Hotmail updating address book
Please everyone, stop setting CURLOPT_SSL_VERIFYPEER to false or 0.
If your PHP installation doesn't have an up-to-date CA root certificate bundle, download the one at the curl website and save it on your server: set a path to it in your file, e.g.
on Windows:curl.cainfo=c:\php\Turning off CURLOPT_SSL_VERIFYPEER allows man in the middle (MITM) attacks, which you don't want!
Clarification on the callback methods:- CURLOPT_HEADERFUNCTION is for handling header lines received *in the response*,- CURLOPT_WRITEFUNCTION is for handling data received *from the response*,- CURLOPT_READFUNCTION is for handling data passed along *in the request*.
The callback "string" can be any callable function, that includes the array(&$obj, 'some Method Name') format.
-Philippe It is important that anyone working with c URL and PHP keep in mind that not all of the CURLOPT and CURLINFO constants are documented.
I always recommend reading the c URL documentation directly as it sometimes contains better information.
The c URL API in tends to be fubar as well so do not expect things to be where you would normally logically look for is especially difficult to work with when it comes to cookies.
If you want to manage cookies in memory without using files including reading, writing and clearing custom cookies then continue reading.To start with, the way to enable in memory only cookies associated with a c URL handle you should use: curl_setopt($curl, CURLOPT_COOKIEFILE, "");c URL likes to use magic strings in options as special commands.Rather than having an option to enable the cookie engine in memory it uses a magic string to do that.Although vaguely the documentation here mentions this however most people like me wouldn't even read that because a COOKIEFILE is the complete opposite of what we want.To get the cookies for a curl handle you can use: curl_getinfo($curl, CURLINFO_COOKIELIST); This will give an array containing a string for each cookie.