We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 03c1039b authored by tobyink's avatar tobyink

Debugging.

parent 37298104
......@@ -95,6 +95,12 @@ class User {
$res = $mdb2->query($q); # Should probably check the return value and do something useful.
if(PEAR::isError($res)) {
header("Content-Type: text/plain");
print_r($res);
exit;
}
return 1;
}
......
......@@ -53,7 +53,7 @@ function doit ()
loading.style.marginLeft = '-16px';
}
$.getJSON("location-ws.php",
$.getJSON("/location-ws.php",
{ 'q' : $('#loc').val() },
function (data, status)
{
......
......@@ -48,12 +48,12 @@ $uri = sprintf('http://ws.geonames.org/searchJSON?q=%s&maxRows=%d&lang=%s&style
# We'll try to use cURL if the extension is installed on this server.
if (function_exists('curl_init'))
{
header("Content-Type: application/json");
$ch = curl_init($uri);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'libre.fm');
$output = curl_exec($ch);
curl_close($ch);
header("Content-Type: application/json");
echo $output;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment