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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.