\n"; $ip = getenv("REMOTE_ADDR") ; $mob = getenv("x-msisdn") ; $mob2 = getenv("HTTP_MSISDN") ; $username="gnews_access"; $password="VibAurc5"; $database="gmanews_wap"; $id2 = $_GET['id']; $dbip="10.10.0.7"; mysql_connect($dbip,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM ws_mobgmanews where id=$id2"; $query2="INSERT INTO ws_ich_download (mobile_num,page) VALUES ('$mob2','breakingnews')"; $result=mysql_query($query); $result2=mysql_query($query2); $num=mysql_num_rows($result); mysql_close(); $i=0; while ($i < $num) { $id=mysql_result($result,$i,"wapid"); $title=mysql_result($result,$i,"title"); $story=mysql_result($result,$i,"story"); $date=mysql_result($result,$i,"date"); $title=str_replace(chr(146),"'",$title); $title=str_replace(chr(145),"'",$title); $story=str_replace(chr(146),"'",$story); $story=str_replace(chr(145),"'",$story); $title=str_replace("chr(145)","‘",$title); // $title=str_replace("‘","%27",$title); // $title=str_replace("’","%27",$title); // $title=str_replace("'","%27",$title); $title=str_replace(",","%2C",$title); $title=str_replace("!","%21",$title); $title=str_replace("/","%2F",$title); $title=str_replace("/","%2F",$title); $story=str_replace("—","-",$story); // $story=str_replace("’","%27",$story); // $story=str_replace("‘","%27",$story); // $story=str_replace("'","%27",$story); $story=str_replace("This page requires a higher version browser","
",$story); $story=preg_replace("/\r\n/","
",$story); $story=str_replace('\r\n',"",$story); $story= stripslashes($story); echo "GMANews.tv

$title
posted $date

$story

Back to Top
Smart Home
"; $i++; } ?>