[PHP] เขียนสคริปรัน localhost ได้ แต่เอาขึ้นโฮสจริงรันไม่ได้

เริ่มโดย picharnan, 01 เมษายน 2009, 22:22:28

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

picharnan

คือผมลองเขียนสคริปดูทีวี  แต่่ว่าพอเอาขึ้นโฮสจริงแล้วมันรันไม่ได้อ่ะครับ

ช่วยดูหน่อยครับ  พึ่งหัดอ่ะครับ

:-X

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ดูทีวีแบบไม่มีโฆษณา</title>
</head>

<?php
$imagePath 
"image/";

$channel['1']['label']= "ทีวีสีช่อง3";
$channel['1']['url']= "http://www.thaifreetv.net/tv/asx/ch-03.asx";

$channel['2']['label']= "ททบ.5";
$channel['2']['url']= "http://www.thaifreetv.net/tv/asx/ch-05.asx";

$channel['3']['label']= "ช่อง7";
$channel['3']['url']= "http://www.thaifreetv.net/tv/asx/ch-07.asx";

$channel['4']['label']= "โมเดิร์นไนน์ ทีวี";
$channel['4']['url']= "http://www.thaifreetv.net/tv/asx/ch-09.asx";

$channel['5']['label']= "NBT";
$channel['5']['url']= "http://www.thaifreetv.net/tv/asx/ch-11.asx";

$channel['6']['label']= "ทีวีไทย";
$channel['6']['url']= "http://www.thaifreetv.net/tv/asx/ch-13.asx";

$channel['7']['label']= "เนชั่น แชนเนล";
$channel['7']['url']= "http://61.47.34.30/bbts004?WMContentBitrate=129000&WMThinning=0";

$channel['8']['label']= "ASTV News1";
$channel['8']['url']= "rtsp://broadcast.manager.co.th/11news1?wmcontentbitrate=120000";

$channel['9']['label']= "TV Pool";
$channel['9']['url']= "rtsp://61.11.232.4/encoder_3d_LOW";

$channel['10']['label']= "Movie Plus";
$channel['10']['url']= "rtsp://streaming.livetv.co.th/LiveTVB-MOVIEPLUS";

$channel['11']['label']= "ช่องสารคดี EDN";
$channel['11']['url']= "rtsp://streaming.livetv.co.th/LiveTVB-EDN";

$channel['12']['label']= "POP";
$channel['12']['url']= "rtsp://streaming.livetv.co.th/LiveTVB-POP";

$channel['13']['label']= "ไทย ไชโย";
$channel['13']['url']= "rtsp://streaming.livetv.co.th/LiveTVB-THAICHAIYO";

$channel['14']['label']= "Variey One";
$channel['14']['url']= "rtsp://streaming.livetv.co.th/LiveTVB-VARIETYONE";

$channel['15']['label']= "MongkolChannel.com";
$channel['15']['url']= "http://www.maxnettv.tv/module_tvonlines/vdo_file.php?id=1865&type=tv&speed=&OBT_fname=vdo_file.php?id=1865&type=tv&speed=";

$channel['16']['label']= "MIC";
$channel['16']['url']= "http://www.maxnettv.tv/module_tvonlines/vdo_file.php?id=687&type=tv&speed=&OBT_fname=vdo_file.php?id=687&type=tv&speed=";

$channel['17']['label']= "สำรวจโลก";
$channel['17']['url']= "http://www.maxnettv.tv/module_tvonlines/vdo_file.php?id=1446&type=tv&speed=&OBT_fname=vdo_file.php?id=1446&type=tv&speed=";

$channel['18']['label']= "Discovery";
$channel['18']['url']= "http://www.maxnettv.tv/module_tvonlines/vdo_file.php?id=1468&type=tv&speed=&OBT_fname=vdo_file.php?id=1468&type=tv&speed=";

$channel['19']['label']= "Game Square";
$channel['19']['url']= "rtsp://61.90.149.194/g2?wmcontentbitrate=512000";

$channel['20']['label']= "สยามกีฬา";
$channel['20']['url']= "mms://202.57.162.46/siamsportradio";


$realUrl $channel["$id"]['url'];
?>

<body bgcolor="#eeeeee">

<object>
      <embed src="<?php echo $realUrl ?>" width="415" height="380" bgcolor="ffffff" autoplay="true" cache="true" enablejavascript="true" controller="true" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"  showstatusbar="true" repeat="true"></embed>
</object>
<br>
<?php
for($i=1;$i<=20;$i++){
echo "<a href='index.php?id=".$i."'>".$channel[$i]['label']."</a><br>";
}
 
?>

ขอบคุณสัญญาณดีๆจาก maxtv.net,livetv.co.th, manager.co.th, thaifreetv.net

</body>
</html>

kingmaster

ลืมรับค่า query string ครับ

แก้ไขจาก

$realUrl = $channel["$id"]['url'];

เป็น

$id = $_GET['id'];
$realUrl = $channel["$id"]['url'];



picharnan