Tuesday, November 4, 2014

Access SSL Enabled URL via Curl

Sometimes you may have problems accessing URL that are SSL enabled. The solution is to simply set the flags below:


    $ch = curl_init();
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
To output and debug the problem you can:
curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
curl_setopt($ch, CURLOPT_STDERR, fopen('php://temp', 'rw+'));
$result = curl_exec($ch);
curl_close($ch);

if ($result === FALSE) {
    printf("cUrl error (#%d): %s
\n", curl_errno($curlHandle),
           htmlspecialchars(curl_error($curlHandle)));
}

rewind($verbose);
$verboseLog = stream_get_contents($verbose);

print_r($verboseLog);

204 comments:

«Oldest   ‹Older   201 – 204 of 204
5689 said...

zzzzz2018.11.6
ugg boots clearance
canadian goose
pandora charms
ugg boots clearance
pandora outlet
pandora outlet
ralph lauren uk
mbt shoes
louboutin shoes
nike outlet

lihat disini said...

baca disini tentang jamu kuat tahan lama pria, bagi anda para ria yang ingin mengatasi ejakulasi dini secara lami maupun tradisional. Anda bisa mendapatkan info yang lengkap tentang solusi ejakulasi dini di buku, maupun internet. akan tetapi jika anda kesultan dalam menemukan solusinya, anda bisa masuk ke halaman ini
ataupun klik disini, bisa juga read more untuk mengetahui tentang toko yang jual obat kuat dan tahan lama lelaki foredi gel. Sebelum membeli sesuatu ada baiknya anda
cek daftar harga barang yang akan anda beli




alsavadyra hanna said...

here we want to cover this great article, and we also share the article to all of you .
viagra asli
manfaat viagra
tips bercinta saat hamil
tips bercinta dengan suami
tips agar tahan lama saat bercinta

onlineprinterhelp said...

visit to our website for Hp printers help

HP Printer customer support number
hp printer customer care number
hp support number
hp service centre USA
hp store contact number
hp service centre near me
HP Printer tech support phone number USA

«Oldest ‹Older   201 – 204 of 204   Newer› Newest»