<?php
// jSON Request URL
$json_url = 'https://creativecommons.tankerkoenig.de/json/detail.php?callback=jQuery21109931204902741544_1440230150966&id=fb79c457-543a-4ff6-ba70-cd270ac2110a&apikey=00000000-0000-0000-0000-000000000001&_=1440230150968';
$username = ‘your_username’; // authentication
$password = ‘your_password’; // authentication
// jSON String for request
$json_string = 'station->e5';
// Initializing curl
$ch = curl_init( $json_url );
// Configuring curl options
$options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => $username . ":" . $password, // authentication
CURLOPT_HTTPHEADER => array(‘Content-type: application/json’) ,
CURLOPT_POSTFIELDS => $json_string
);
// Setting curl options
curl_setopt_array( $ch, $options );
// Getting results
$result = curl_exec($ch); // Getting jSON result string
?>
- Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.44, 5.5.24 - 5.5.28, 5.6.7 - 5.6.12
- Parse error: syntax error, unexpected ':', expecting ')' in /in/Yjqkq on line 19
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
- Parse error: parse error, unexpected ':', expecting ')' in /in/Yjqkq on line 19
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error, expecting `')'' in /in/Yjqkq on line 19
Process exited with code 255.
preferences:
240.98 ms | 1395 KiB | 145 Q