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