Jump to content

[SOLVED] Return an https SSL page as a string


neostrife

Recommended Posts

Hey!

 

I'm unsure what PHP function to use to return an https SSL page as a string to run a regex on.

 

I've done this before with Perl using Perl modules WWW::Mechanize.

 

I basically want to send a GET request using http_build_query() to an https site and parse the output.

 

Thanks in advance, cheers.

Im unsure as to how http_build_query() would handle a site with an SSL certificate. However, it can be done with the cURL library (see: http://www.php.net/curl).

 

You have two choices with regard to the SSL certificate. You can either ignore it and don't check the certificate (set the curl option CURLOPT_SLL_VERIFYPEER to false) or you can provide or you can provide a file to check the validity of the SSL and set the file with the CURLOPT_CAINFO option.

 

If you go for the second, you can find the .crt file you need by downloading a copy of cURL from http://curl.haxx.se/download.html

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.