Here is my code:
$service_url = 'https://my_domain.org/atlas.php?city=' . $this_city . '&cntry=' . $this_state;
$curl = curl_init($service_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$curl_response = curl_exec($curl);
curl_close($curl);
$calc_data1 = json_decode($curl_response, True); //decode the data so it is usable
|
The problem is that the IDE never returns anything but False for $curl_response.
curl_getinfo($curl) returns this (instead of the proper data):
: array =
url: string = "https://my_domain.org/atlas.php?city=New Orleans&cntry=Louisiana"
content_type: undefined = NULL
http_code: long = 0
header_size: long = 0
request_size: long = 0
filetime: long = -1
ssl_verify_result: long = 20
redirect_count: long = 0
total_time: double = 0.25
namelookup_time: double = 0.062
connect_time: double = 0.156
pretransfer_time: double = 0
size_upload: double = 0
size_download: double = 0
speed_download: double = 0
speed_upload: double = 0
download_content_length: double = -1
upload_content_length: double = -1
starttransfer_time: double = 0
redirect_time: double = 0
redirect_url: string = ""
primary_ip: string = "66.147.244.170"
certinfo: array =
primary_port: long = 443
local_ip: string = "192.168.2.3"
local_port: long = 51731
http_version: long = 0
protocol: long = 2
ssl_verifyresult: long = 0
scheme: string = "HTTPS"
appconnect_time_us: long = 0
connect_time_us: long = 156000
namelookup_time_us: long = 62000
pretransfer_time_us: long = 0
redirect_time_us: long = 0
starttransfer_time_us: long = 0
total_time_us: long = 250000 )
error occurred during curl exec. Additional info:
The script works fine when run on the actual server. Why can't PhpED communicate properly using cURL?
Is there a problem because I am calling "https"?