0
我需要一个PHP post方法的解决方案,我有get方法的解决方案。php post方法发件人
实施例:
文件夹:/ vaibrother
第一文件来源:data_get.php
<?php
$data="nasir=90,sajib=80,masum=100,yeasin=110,mayeen=99";
$data=explode(",",$data);
for($i=0; $i<count($data); $i++){
$ns=explode("=",$data[$i]);
$name=$ns[0]; $score=$ns[1];
if(isset($_GET["id"]) && $_GET["id"] == $name) $output = "$name = $score";
} if(!empty($output)) echo $output; ?>
<hr>
<form action="" method="GET">
<input name="id" value="masum"> {example: nasir, sajib, masum, yeasin, mayeen}
<input type="submit" value="check">
</form>
第二文件来源:data_post.php
<?php
$data="nasir=90,sajib=80,masum=100,yeasin=110,mayeen=99";
$data=explode(",",$data);
for($i=0; $i<count($data); $i++){
$ns=explode("=",$data[$i]);
$name=$ns[0]; $score=$ns[1];
if(isset($_POST["id"]) && $_POST["id"] == $name) $output = "$name = $score";
} if(!empty($output)) echo $output; ?>
<hr>
<form action="" method="POST">
<input name="id" value="masum"> {example: nasir, sajib, masum, yeasin, mayeen}
<input type="submit" value="check">
</form>
第三文件来源:get_success.php
This is a proxy<hr>
<?php
$fp=fopen("http://localhost/vaibrother/data_get.php?id=mayeen","r");
echo fread($fp,99999);
fclose($fp);
?>
第四档来源:post_success.php{} ??????
(我需要该文件的解决方案)
This is a proxy<hr>
<?php
/*
http://localhost/vaibrother/data_post.php
id = mayeen
[ How to display result 99 ? ]
I Dont Know
*/
?>
卷曲:http://uk3.php.net/curl或不卷曲:http://wezfurlong.org/blog/2006/nov/http-post-from-php-without-curl/ – Steve
您正在寻找的是如何进行POST请求。 http://stackoverflow.com/questions/5647461/how-do-i-send-a-post-request-with-php – YRM
我需要像我这样的例子 – NASIRUDDIN