Php在post请求中读取xml [英] Php reading xml in post request

查看:69
本文介绍了Php在post请求中读取xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我执行了两个步骤

So, I have perform two steps

a) 在其中一个 php 文件中创建一些随机的 xml 文件.b) 在第二个文件中解析相同的 xml 文件.

a) Create a some random xml file in one of the php file. b) Parse the same xml file in second file.

关键点是a) 中的 .php 文件将向 php 文件 b) 发出一个 post 请求,并且只有 xml 作为它的请求.

Key points are that php file in a) will issue a post request to php file b) with only xml as its request.

文件 b) 必须使用 SImpleXml 读取 xml 文件.

file b) will have to read the xml file using SImpleXml.

我正在尝试为此做点什么http://blog.superfeedr.com/API/pubsubhubbub/getting-started-with-pubsubhubbub/.

I am trying to do something for this http://blog.superfeedr.com/API/pubsubhubbub/getting-started-with-pubsubhubbub/.

我的服务器将从 superfeeder 接收 xml 形式的通知.通知将是请求中的 xml 文件.

I my server will be receiving notifications in form of xml from the the superfeeder. The notifications will be xml file in the request.

我正在执行步骤 a) 只是为了确认我的部分 b) 是正确的.

I am doing step a) just to confirm that my part b) is correct.

如何在 PHP 中执行此操作.我尝试了所有 $_REQUEST、$GLOBALS 变量.但是,不确定是什么方式!

How to do this in PHP. I tried all the $_REQUEST, $GLOBALS variable. But, not sure whats the way!

推荐答案

我不太确定我是否理解您要执行的操作,但请尝试查看原始帖子数据.这是一篇博客文章,对此进行了一些讨论.

I'm not really sure I understand what you are trying to do but try looking in to reading raw post data. Here is a blog post that talks about it a little bit.

http://www.codediesel.com/php/reading-raw-post-data-in-php/

这篇关于Php在post请求中读取xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆