neostrife Posted June 9, 2008 Share Posted June 9, 2008 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. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted June 9, 2008 Share Posted June 9, 2008 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 Quote Link to comment Share on other sites More sharing options...
neostrife Posted June 9, 2008 Author Share Posted June 9, 2008 ty. this library is exactly what i was looking for. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.