i am trying to get data from my local database to android device but i on every try i got "java.net.ConnectException: /127.0.0.1:443 - Connection refused" message
String url = "https://127.0.0.1/www/json.php?userId=admin&type=1234";
this is my link i am using and these are my php codes
<?php
$mysql_host = "localhost";
$mysql_user = "admin";
$mysql_password = "1234";
$mysql_dbname ="json";
$conn = @mysql_connect($mysql_host, $mysql_user, $mysql_password);
if(! $conn) die("MySQL Error: ".mysql_error());
mysql_select_db($mysql_dbname, $conn) or die("MySQL Error: ".mysql_error());
?>
<?php
include("connect.php");
$arg1 = $_GET['userId'];
$arg2 = $_GET['type'];
mysql_query("SET NAMES 'utf8'");
$query = mysql_query("select * from product");
$rows = array();
while($r = mysql_fetch_assoc($query)) {
$rows[] = $r;
}
$json = array();
$json['userId'] = $arg1;
$json['type'] = $arg2;
$json['products'] = $rows;
die(json_encode($json));
?>
and my php files are in C:\xampp\htdocs\www directory