把xml循环到数组里然后post数组不可能直接post xml或者你post一个xml地址,接受到后,去读xml
解决方案 »
- 【求点评】生成缓存的一段代码,大家觉得有什么不足之处?代码风格方面
- 如何获取ldap的根DN?
- 【求助】php require文件之后 部分CSS样式失效
- 关于PHP5新特性的一些疑问
- PHP,能够识别是不是手机来访问吗?
- 请问PHP里怎样操作剪贴板,IE里可以用JavaScript的window.clipboardData对象来操作,可是这个对象在linux的Mozilla的Firefox不支持?
- 有没有vbb的高手,过来帮忙看看!
- php5中str_replace 使用问题?????
- Faeryboard VBB 2.3.0 的菜单怎么修改?
- 再问个小问题,别笑我! 继续给分!
- 缓存成什么格式的文件效率高
- MySQL 6.0 有严重的 BUG
<?xml version="1.0" encoding="UTF-8"?>
<test>
This is a XML.
</test>DOC;$http_header = "";
$http_header .= "POST /xxx.aaa HTTP/1.1\r\n";
$http_header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$http_header .= "Host: www.xxx.com\r\n";
$http_header .= "Content-Length: ".strlen($post)."\r\n";
$http_header .= "Connection: Keep-Alive\r\n";
$http_header .= "Cache-Control: no-cache\r\n";
$http_header .= "\r\n";$fp = @fsockopen("www.xxx.com", 80, $errno, $errstr, 30);
if (!$fp)
{
//---- 连不上 ----
exit;
}
fwrite($fp, $http_header);
fwrite($fp, $post);
echo fgets($fp, 1280);
fclose($fp);
<?xml version="1.0" encoding="UTF-8"?>
<test>
This is a XML.
</test>DOC;$http_header = "";
$http_header .= "POST /xxx.aaa HTTP/1.1\r\n";
$http_header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$http_header .= "Host: www.xxx.com\r\n";
$http_header .= "Content-Length: ".strlen($post)."\r\n";
$http_header .= "Connection: Keep-Alive\r\n";
$http_header .= "Cache-Control: no-cache\r\n";
$http_header .= "\r\n";$fp = @fsockopen("www.xxx.com", 80, $errno, $errstr, 30);
if (!$fp)
{
//---- 连不上 ----
exit;
}
fwrite($fp, $http_header);
fwrite($fp, $post);
echo fgets($fp, 1280);
fclose($fp);