Here are the php files :
(connection.php)
<?php
define('hostname','sql203.ezyro.com');
define('user','ezyro_19243512');
define('password','********');
define('databaseName','ezyro_19243512_kmvonline');
$connect=mysql_connect(hostname,user,password,databaseName);
?>
(showNotification.php)
<?php
if($_SERVER[REQUEST_METHOD]==GET)
{
include 'connection.php';
showNotification();
}
function showNotification()
{
global $connect;
$query = SELECT * FROM ezyro_19243512_kmvonline.collegeNotification ORDER BY id DESC;
$result = mysql_query($query,$connect);
$number_of_rows=mysql_num_rows($result);
$temp_array=array();
if($number_of_rows>0)
{
while($row=mysql_fetch_assoc($result)){
$temp_array[]=$row;
}
}
header('Content-Type: application/json');
echo json_encode(array(collegeNotifications=>$temp_array));
mysql_close($connect);
}
?>
From here i want the json object to my app…
http://shashanksingh.ezyro.com/php/showNotifications.php
It is showing the correct json data
{
collegeNotifications:[
{
id:3,
title:no title,
description:no description,
department:0,
day:1,
month:1
},
{
id:2,
title:no title,
description:no description,
department:0,
day:1,
month:1
},
{
id:1,
title:no title,
description:no description,
department:0,
day:1,
month:1
}
]
}
But in my android app and even in postman application I am receiving this HTML code :
<html>
<body>
<script type=text/javascript src=/aes.js ></script>
<script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e=,f=0;f
<d.length;f++)e+=(16>d[f]?0:)+d[f].toString(16);return e.toLowerCase()}var a=toNumbers(f655ba9d09a112d4968c63579db590b4),b=toNumbers(98344c2eee86c3994890592585b49f80),c=toNumbers(0e5a2729453a722e4baeba76f6b3c3a0);document.cookie=__test=+toHex(slowAES.decrypt(c,2,a,b))+; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/; location.href=http://shashanksingh.ezyro.com/php/showNotifications.php?i=1;
</script>
<noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript>
</body>
</html>
````</t>