<?php
$cp=$_POST[cp];
$us=$_POST[us];
$s=file_get_contents('http://www.xxx.com/index.php?aid=$cp&mid=$us');
preg_match('<td valign=\"top\">(.*)<\/td>/isU',$s,$m);
print_r($m[1]);
?><form action ="php.php" method ="post">
<input type ="text" name ="cp" size ="3" maxlength ="5"/>
<input type ="text" name ="us" size ="3" maxlength ="5"/>
<input type="submit" value ="提交"/>
</form>其中index.php?aid=$cp和&mid=$us是一个数值或者中文,但提交无法传递数值,不知是哪个地方有误,请大家帮忙看看。
$cp=$_POST[cp];
$us=$_POST[us];
$s=file_get_contents('http://www.xxx.com/index.php?aid=$cp&mid=$us');
preg_match('<td valign=\"top\">(.*)<\/td>/isU',$s,$m);
print_r($m[1]);
?><form action ="php.php" method ="post">
<input type ="text" name ="cp" size ="3" maxlength ="5"/>
<input type ="text" name ="us" size ="3" maxlength ="5"/>
<input type="submit" value ="提交"/>
</form>其中index.php?aid=$cp和&mid=$us是一个数值或者中文,但提交无法传递数值,不知是哪个地方有误,请大家帮忙看看。
if(!empty($_POST)){
$cp=$_POST['cp'];
$us=$_POST['us'];
}
print_r($_POST); //查看是否有值
$cp=$_GET['cp'];
$us=$_Get['us'];
获取吧?
??????$s=file_get_contents("http://www.xxx.com/index.php?aid=$cp&mid=$us");
$url="http://www.xxx.com/index.php?aid=$cp&mid=$us";
$s=file_get_contents($url);
$s=file_get_contents("http://www.xxx.com/index.php?aid=".$cp."&mid=".$us);
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-fopen
allow_url_fopen = On