i have read jsondata from url , using curl
$file="someurl";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $file);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_REFERER,1);
$result = curl_exec($ch);
curl_close($ch);
var_dump($result);
when i run the passing url it display json data like below
{"data":"data","data":"data","data":"data","data":"data"}
if i put var_dump($result);
it show like
string(534) " {"data":"data","data":"data","data":"data","data":"data"}"
i view the page source of the php file to read contents of the curl
it display like
string(534) "
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
{"data":"data","data":"data","daa":"data","data":"data"}<br>
what problem in the code , is it code or json data