wpt394 Posted July 8, 2007 Share Posted July 8, 2007 If anyone can give me some (tested) code to perform a curl on https://www.verisign.com/ or https://www.verisign.com/index2.html I would appreciate it. I have been having days of trouble using curl to connect to a https:// url. Please help if you can! Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/58899-php-curl/ Share on other sites More sharing options...
JP128 Posted July 8, 2007 Share Posted July 8, 2007 Are you just trying to see something from the site, or get information from it? Link to comment https://forums.phpfreaks.com/topic/58899-php-curl/#findComment-292237 Share on other sites More sharing options...
wpt394 Posted July 8, 2007 Author Share Posted July 8, 2007 I do'nt understand the difference between see something and get information from it....In the end I just want the html code of a https:// site. I will eventually be doing preg_matches on it, but that's down the road. All I need right now is help connecting to a https:// url (i.e. https://www.verisign.com) using curl. Link to comment https://forums.phpfreaks.com/topic/58899-php-curl/#findComment-292245 Share on other sites More sharing options...
cooldude832 Posted July 8, 2007 Share Posted July 8, 2007 a https:// site would suggest the data on it has a certain level of security needed for it and it is only viewable with a login of some sorts, curl is like fopen for urls. so you *shouldn't have an issue opening any url even on a ssh server if you do try saying curl($site) or die ('CURL FAILED'); Link to comment https://forums.phpfreaks.com/topic/58899-php-curl/#findComment-292326 Share on other sites More sharing options...
wpt394 Posted July 8, 2007 Author Share Posted July 8, 2007 It is quite a bit more complicated that it seems. Trust me, I've spent a couple days pouring over the internet looking for a solution. I'm starting to think that it might be an issue with my webhost? I'm not sure... the website https://www.verisign.com doesn't require a login/password at all...Here is the code I've been using to try to connect to it... $url = 'https://www.verisign.com/'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $result=curl_exec ($ch); echo curl_error($ch); echo ' '.curl_errno($ch); curl_close ($ch); echo("<br>Results: <br>".$result); This comes up with the "error 7: could not connect to www.verisign.com IP 1 Permission Denied" Additionally, I've tried connecting to other 'https' urls, and receive the exact same error....Any help would be appreciated.. Link to comment https://forums.phpfreaks.com/topic/58899-php-curl/#findComment-292331 Share on other sites More sharing options...
cooldude832 Posted July 8, 2007 Share Posted July 8, 2007 just out of curiosity have you tried to use different ports? I know https goes via a different port than 80 (i think), but that might be your issue. Also the second part could be involved in a server side (on the ssh server) baubblefish key or something in which you HTTP_SERVER has to be LOCALHOST or block and you have to have the access key somehow to CURL it. Link to comment https://forums.phpfreaks.com/topic/58899-php-curl/#findComment-292335 Share on other sites More sharing options...
JP128 Posted July 8, 2007 Share Posted July 8, 2007 if the https is the problem, try taking off the s.... https://www.verisign.com shows the same info as: http://www.verisign.com I checked Link to comment https://forums.phpfreaks.com/topic/58899-php-curl/#findComment-292338 Share on other sites More sharing options...
wpt394 Posted July 8, 2007 Author Share Posted July 8, 2007 I have not tried changing ports, but I'm not sure how I would go about doing that, or how I would go about determining which port to try... I am using php on a webhost, and would be interested to know if anyone running their own apache server w/curl module could test out the script... p.s. Thanks JP128, but I am only using https://www.verisign.com as an example of a https:// site...I should have been more clear. Link to comment https://forums.phpfreaks.com/topic/58899-php-curl/#findComment-292345 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.