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. Link to comment https://forums.phpfreaks.com/topic/109450-solved-return-an-https-ssl-page-as-a-string/ 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 Link to comment https://forums.phpfreaks.com/topic/109450-solved-return-an-https-ssl-page-as-a-string/#findComment-561424 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. Link to comment https://forums.phpfreaks.com/topic/109450-solved-return-an-https-ssl-page-as-a-string/#findComment-561434 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.