ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comพัฒนาเว็บไซต์Programming[PHP] เขียนสคริปรัน localhost ได้ แต่เอาขึ้นโฮสจริงรันไม่ได้
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: [PHP] เขียนสคริปรัน localhost ได้ แต่เอาขึ้นโฮสจริงรันไม่ได้  (อ่าน 1633 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
picharnan
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 90
ออฟไลน์ ออฟไลน์

กระทู้: 1,399



ดูรายละเอียด
« เมื่อ: 01 เมษายน 2009, 22:22:28 »

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

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

 Lips Sealed

โค๊ด:
<!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[&#39;1&#39;][&#39;label&#39;]= "ทีวีสีช่อง3";
$channel[&#39;1&#39;][&#39;url&#39;]= "http://www.thaifreetv.net/tv/asx/ch-03.asx";

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

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

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

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

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

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

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

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

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

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

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

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

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

$channel[&#39;15&#39;][&#39;label&#39;]= "MongkolChannel.com";
$channel[&#39;15&#39;][&#39;url&#39;]= "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[&#39;16&#39;][&#39;label&#39;]= "MIC";
$channel[&#39;16&#39;][&#39;url&#39;]= "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[&#39;17&#39;][&#39;label&#39;]= "สำรวจโลก";
$channel[&#39;17&#39;][&#39;url&#39;]= "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[&#39;18&#39;][&#39;label&#39;]= "Discovery";
$channel[&#39;18&#39;][&#39;url&#39;]= "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[&#39;19&#39;][&#39;label&#39;]= "Game Square";
$channel[&#39;19&#39;][&#39;url&#39;]= "rtsp://61.90.149.194/g2?wmcontentbitrate=512000";

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


$realUrl $channel["$id"][&#39;url&#39;];
?>

<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=&#39;index.php?id=".$i."&#39;>".$channel[$i][&#39;label&#39;]."</a><br>";
}
 
?>

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

</body>
</html>
บันทึกการเข้า
kingmaster
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 11
ออฟไลน์ ออฟไลน์

กระทู้: 2,181



ดูรายละเอียด
« ตอบ #1 เมื่อ: 01 เมษายน 2009, 22:33:04 »

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

แก้ไขจาก

โค๊ด:
$realUrl = $channel["$id"]['url'];

เป็น

โค๊ด:
$id = $_GET['id'];
$realUrl = $channel["$id"]['url'];

บันทึกการเข้า

Bug Fix AllinoneGenerator --> BugFix... | รถตู้เชียงใหม่
picharnan
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 90
ออฟไลน์ ออฟไลน์

กระทู้: 1,399



ดูรายละเอียด
« ตอบ #2 เมื่อ: 01 เมษายน 2009, 22:42:58 »

ขอบคุณมากครับ  ใช้ได้แล้วครับ

^___^
บันทึกการเข้า
หน้า: [1]   ขึ้นบน
พิมพ์