My xampp wont load anything on this, I tried it on gearhost, same thing, but on one other free host, it worked.. json was loaded as it should.
Here's the code
$username= urlencode($_GET["username"]);
$endpoint = 'https://api.ebay.com/ws/api.dll';
// create the xml request that will be POSTed
$xml = '<?xml version="1.0" encoding="utf-8"?>';
$xml .= '<GetStoreRequest xmlns="urn:ebay:apis:eBLBaseComponents">';
$xml .= '<RequesterCredentials>';
$xml .= '<eBayAuthToken></eBayAuthToken>';
$xml .= '</RequesterCredentials>';
$xml .= '<UserID>'. $username .'</UserID>';
$xml .='<LevelLimit>1</LevelLimit>';
$xml .= '</GetStoreRequest>';
$headers = array(
'X-EBAY-API-COMPATIBILITY-LEVEL:933',
'X-EBAY-API-DEV-NAME:--',
'X-EBAY-API-APP-NAME:--',
'X-EBAY-API-CERT-NAME:--',
'X-EBAY-API-SITEID:0',
'X-EBAY-API-CALL-NAME:GetStore'
);
$session = curl_init($endpoint);
curl_setopt($session, CURLOPT_POST, true);
curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
curl_setopt($session, CURLOPT_POSTFIELDS, $xml);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$responsexml = curl_exec($session);
curl_close($session);
$json = json_encode(simplexml_load_string($responsexml),true);
$obj = json_decode($json,true);
echo $responsexml;
echo $obj;
if ($responsexml === false) { die(curl_error($session)); }