注册 登录
编程论坛 PHP技术论坛

求助!关于index.php?id=xxx 的问题

wxtv 发布于 2009-09-18 00:06, 1595 次点击
<?php
$id = $_GET['id'];
header("Cache-Control:no-cache,must-revalidate");     
header("Pragma:no-cache");
$lines = file_get_contents(' http://218.22.14.84:8080/soms4/web/jwzt/ahtv/anhui_live.jsp?channelId=200');
$addresstemp = strstr($lines,"mms://");
$address = strtok($addresstemp,"\"");
echo $address;
?>
----------------------------
我想用<?php echo $id?>替换 http://218.22.14.84:8080/soms4/web/jwzt/ahtv/anhui_live.jsp?channelId=200这个中的200的值。

用上面的代码做成index.php的文件。

最后通过index.php?id=200来实现

不知道<?php echo $id?>在 http://218.22.14.84:8080/soms4/web/jwzt/ahtv/anhui_live.jsp?channelId= 如何来表达。望哪位高手指点一下为谢。
3 回复
#2
SkyGull2009-09-18 00:22
<?php
$id = $_GET['id'];
header("Cache-Control:no-cache,must-revalidate");     
header("Pragma:no-cache");
$lines = file_get_contents(' http://218.22.14.84:8080/soms4/web/jwzt/ahtv/anhui_live.jsp?channelId='.$id);
$addresstemp = strstr($lines,"mms://");
$address = strtok($addresstemp,"\"");
echo $address;
?>
#3
ttdw2009-09-19 18:03
建议楼主学点基础吧.
#4
czg1236987412009-09-22 17:13
<a href="index.php?id=<? echo $_post["ID"]; ?>"></a>
1