code_junkie

reading SSL page with CURL (php)

Nov 14th, 2011
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. $options = array(
  2. CURLOPT_RETURNTRANSFER => true, // return web page
  3. CURLOPT_HEADER => false, // don't return headers
  4. CURLOPT_FOLLOWLOCATION => true, // follow redirects
  5. CURLOPT_ENCODING => "", // handle all encodings
  6. CURLOPT_USERAGENT => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:x.x.x) Gecko/20041107 Firefox/x.x", // who am i
  7. CURLOPT_AUTOREFERER => true, // set referer on redirect
  8. CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect
  9. CURLOPT_TIMEOUT => 120, // timeout on response
  10. CURLOPT_MAXREDIRS => 10, // stop after 10 redirects
  11. CURLOPT_SSL_VERIFYHOST => 1,
  12. );
Add Comment
Please, Sign In to add comment