"; $root_element ="homepage"; $xml .= "<$root_element>"; error_reporting(0); require '../../include/asset.php'; require '../../include/Conn.php'; require '../../include/config.php'; $main_img_path="393x213"; //$thumb_img_path="155x81"; $thumb_img_path="150x81"; $vodcat=array(8,299,5573,311); $tabs=array(1,2,3,4); $tabname=array("جديد","الاكثر رواجاً","افلام","الأحدث"); for($k=0;$k"; while($row=mysql_fetch_assoc($result)){ $name=$row['smalltitle']; $title=$row['smalltitle']; $t=text_summarise($row['sData'],5) ; $v_url=url_create("id",$t,$row['ID'],$title); //$image="https://images6.alarab.com".create_thumb($row['film'])."146-100/" . $row['picture']; $image="https://images.alarab.com/".create_thumb($row['film']) . $row['picture']; if ($row['file'] !="" ){ if (strpos(row['file'], 'youtube') !== false) { $row['file']=$row['file']; }else{ $mp4file= $row['file']; if(($mp4file > 5000 AND $mp4file < 96982) OR ($mp4file > 100025 AND $mp4file < 122209) ) { if($mp4file > 5000 AND $mp4file < 96982) { $file= "https://cdn.alarab.com/media,,,/{$mp4file}.mp4.urlset/playlist.m3u8"; } if($mp4file > 100025 AND $mp4file < 122209) { $file= "https://cdn.alarab.com/hdiphone,,,/{$mp4file}.mp4.urlset/playlist.m3u8"; } } if($mp4file > 151496) { $url='http://conv.alarab.com/indicator.php?id='.$mp4file; //file_get_contents() reads remote webpage content $lines_string=file_get_contents($url); //output, you can also save it locally on the server htmlspecialchars($lines_string); $lines_string=preg_replace('/\s+/', ' ', $lines_string); $data=explode(":",$lines_string); $renderations=str_replace(" ","",$data[0]); $renderations=str_replace("0p","",$renderations); $row[file]= "https://cdn.alarab.com/h264/".$mp4file."_,".$renderations.",0p.mp4.urlset/playlist.m3u8"; if($renderations=="SD"){ $row[file]= "https://cdn.alarab.com/h264/".$mp4file."_".$renderations.",,,.mp4.urlset/playlist.m3u8"; } } } } $xml .=" "; } $xml .= ""; } $xml .= ""; $xml = simplexml_load_string($xml); // where $xml_string is the XML data you'd like to use (a well-formatted XML string). If retrieving from an external source, you can use file_get_contents to retrieve the data and populate this variable. $json = json_encode($xml,JSON_UNESCAPED_UNICODE); // convert the XML string to JSON $array = json_decode($json,TRUE); echo $json; mysql_close($conn); $fp = fopen($cachefile, 'w'); // save the contents of output buffer to the file fwrite($fp, ob_get_contents()); // close the file fclose($fp); // Send the output to the browser ob_end_flush(); ?>