Attempting to do a Http Post or a Get to a php web service. Currently returning JSON Object.
I think my PhP is in order as if you go to Lycos Tripod - 404 Error it will give you the JSON response.
The Php code below is currently setup for a Get request.
And my Java Android code is as follows:
Exception recieved:
Java.net.unknownHostException: members.multimania.co.uk.
Anyone have any suggestions with what is going wrong?
Thankyou in advance
I think my PhP is in order as if you go to Lycos Tripod - 404 Error it will give you the JSON response.
The Php code below is currently setup for a Get request.
Code:
<?php
require 'jsonwrapper.php';
$db = mysql_connect("localhost","*****","*****");
mysql_select_db("mactm_uk_db");
$q=mysql_query("SELECT * FROM info WHERE id = '1'");
while($e=mysql_fetch_assoc($q))
$output[]=$e;
echo(json_encode($output));
print(json_encode($output));
mysql_close();
?>
And my Java Android code is as follows:
Code:
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet("http://members.multimania.co.uk/mactm/index.php");
HttpResponse response = httpclient.execute(httpget);
HttpEntity entity = response.getEntity();
text.setText("This is it"+ entity.toString());
Exception recieved:
Java.net.unknownHostException: members.multimania.co.uk.
Anyone have any suggestions with what is going wrong?
Thankyou in advance