Make a HTTPS request through PHP and get response
this might work, give it a shot.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
// Set so curl_exec returns the result instead of outputting it.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Get the response and close the channel.
$response = curl_exec($ch);
curl_close($ch);
for more info, check
http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/
How to send a GET request from PHP?
Unless you need more than just the contents of the file, you could use file_get_contents
.
$xml = file_get_contents("http://www.example.com/file.xml");
For anything more complex, I'd use cURL.
How do I make a POST request over HTTPS in PHP?
I think you cannot talk directly HTTPS, as it is HTTP encrypted with the public certificate of the server you are connecting to. Maybe you can use some of the ssl functions in php. But, this will take you some time and frankly, there are easier things.
Just take a look at cURL (client URL), that has support for GET and POST requests, and also connecting to https servers.
How to make an HTTP request in PHP?
The easiest way is probably to use cURL. See https://web.archive.org/web/20180819060003/http://codular.com/curl-with-php for some examples.
Related Topics
PHP How to Get the Base Domain/Url
How to Use Two Submit Buttons, and Differentiate Between Which One Was Used to Submit the Form
Get Date for Monday and Friday for the Current Week (Php)
Simple Comet Example Using PHP and Jquery
How to Use PHP in a JavaScript Function
Using Laravel Socialite to Login to Facebook
Select Within 20 Kilometers Based on Latitude/Longitude
Inserting Now() into Database with Codeigniter's Active Record
PHP Datetime Microseconds Always Returns 0
How to Install an Older Version of PHPunit Through Pear
What Is a Good Method to Sanitize the Whole $_Post Array in PHP
When and Why Should $_Request Be Used Instead of $_Get/$_Post/$_Cookie
Fatal Error: Call to a Member Function Query() on Null
Parsing JavaScript (Not JSON) in PHP