简单的脚本PHP:用头后的数据....不工作
<?php
$host = "mysite.com";
$path = "/test.php";
$data = "drivingMeCrazy";
$data = urlencode($data);
header("POST $path HTTP/1.1\r\n");
header("Host: $host\r\n");
header("Content-type: application/x-www-form-urlencoded; charset=utf-8\r\n");
header("Content-length: " . strlen($data) . "\r\n");
header("Connection: close\r\n\r\n");
header($data);
?>
运行此,我的服务器只是给我内部错误。我需要做的只是...... POST。没有其他的。我不需要回应或任何东西。
以下规格从:http://www.sixapart.com/pronet/docs/trackback_spec。
感谢您修复我的文章。你怎么在这里添加代码,虽然......认真? :)我知道有代码按钮,但我讨厌有空白,我想输入之间的无形空间。有没有办法使用[code]之类的标签?这将会正确地格式化并给你一种方法来查看你实际粘贴代码的位置。 – 2010-02-05 19:21:29
@Senica将每行代码前缀为4个空格,或者使用后退标记(〜键)来标记内嵌的“代码”。编辑你的文章,你可以看到其他人如何改进标记。 – meagar 2010-02-05 19:25:15