1
votes

I looked at the threads and followed suggestions - which got me here... I'm using WAMP - php rev 5.4.12 (Win7)

Code is as simple as possible: $result = file_get_contents("https://g4apps.bliptrack.net/blipzones/report/publicdisplayapi.seam?display_id=dvp_vms4");

(this URL returns an XML file - works in browsers....)

The error is "Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?..."

I did add to php.ini:

allow_url_include = On extension=php_openssl.dll

to no avail

When I ask, I get: openssl: no http wrapper: yes https wrapper: no

Any suggestions? (I work w/PHP but not an expert...)

1
@Popnoodles: That’s nonsense. - CBroe
“When I ask, I get: openssl: no” – well then you obviously did not enable openssl properly. - CBroe
Instead of just commenting that OP obviously did not do something properly, let's try to find out why... (1) Did you restart apache after making changes to php.ini? (2) Wamp has more than one php.ini file, you might not have changed the correct one. Did you change them all? - Popnoodles

1 Answers

1
votes

You should use cURL here instead of socket connection.

$ch =   curl_init();
curl_setopt($ch, CURLOPT_URL, "https://g4apps.bliptrack.net/blipzones/report/publicdisplayapi.seam?display_id=dvp_vms4");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$xmlPage    =   curl_exec($ch);
curl_close($ch);

notice use of "CURLOPT_SSL_VERIFYPEER" as 0/false.