open All Channels
seplocked EVE Technology Lab
blankseplocked Changing my script to use https but it's not working
 
This thread is older than 90 days and has been locked due to inactivity.


 
Author Topic

DejaPeaux
Mine 'N' Refine
The Unforgiven Alliance
Posted - 2011.08.12 23:37:00 - [1]
 

I have a simple script to check if the server is online.
Please see below.
the current url is http but if i change it to https i get the following error,

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in C:\xampp\htdocs\evestatus.php:8 Stack trace: #0 C:\xampp\htdocs\evestatus.php(8): SimpleXMLElement->__construct('') #1 {main} thrown in C:\xampp\htdocs\evestatus.php on line 8

Can anyone give me a clue what i'm doing wrong, or better way to get the data using https

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<?php
$url = "http://api.eve-online.com/server/ServerStatus.xml.aspx";
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$Status = curl_exec ($curl);
curl_close ($curl);
$eve_Status = new SimpleXMLElement($Status);
if ($eve_Status->result->serverOpen == "True")
echo "Tranquility is online and contains " . $eve_Status->result->onlinePlayers . " pilots.";
else
echo "Tranquility is offline";
?>

Ydnari
Gallente
Estrale Frontiers
Posted - 2011.08.13 01:05:00 - [2]
 

The SSL certificate for https://api.eve-online.com is actually for *.eveonline.com, so it's invalid for that address. Use https://api.eveonline.com (no dash).




 

This thread is older than 90 days and has been locked due to inactivity.


 


The new forums are live

Please adjust your bookmarks to https://forums.eveonline.com

These forums are archived and read-only