حل شد
$xml = gzdecode(file_get_contents('http://www.tsetmc.com/tsev2/data/TradeDetail.aspx?i=65883838195688438'));$xml = simplexml_load_string($xml, "SimpleXMLElement", LIBXML_NOCDATA); $json = json_encode($xml);$array = json_decode($json,TRUE);
$con=mysql_connect("localhost","****","****");mysq l_select_db("markstat_tse",$con) or die(mysql_error());
$count= count($array[row])-1;
for ($i=0; $i <= $count; $i++){ $showx= $array[row][$i][cell]; $sql = "INSERT INTO `detail` (`no`, `time`, `vol`, `price`) VALUES ('$showx[0]', '$showx[1]', '$showx[2]', '$showx[3]')"; $result = mysql_query($sql);}