By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

XML feed and response

P: n/a
I am a newbie to PHP and HTML. I need to recieve an XML string from
an outside source that in turns needs to be parsed to read a record
from a database and then return the answer. I have successfully
installed PHP 5 (Fedora Core 3) and recompiled it for my Informix DB.
I am able to query the DB using SQL commands and it works.

What I don't get (because I am not knowledgable in HTML) is how to
receive this string of data. I bought a book (PHP 5 Bible) and have
been reading about forms. Is the $_POST command what I need to use?
Once I get this XML string in PHP I think I can handle this until I
have to send back the result. I am guessing another $_POST command?

Also how could I simulate sending this request?

Thanks
Gary

Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hello, would you describe your requirements in more detail? Are you
implementing a web application? A web site in other words? Where does the
xml string come from? from the user? How does the user enter it? how is the
response is presented to the user? is the response put in to HTML?

konstantin

"Gary Quiring" <gq******@msn.com> wrote in message
news:kl********************************@4ax.com...
I am a newbie to PHP and HTML. I need to recieve an XML string from
an outside source that in turns needs to be parsed to read a record
from a database and then return the answer. I have successfully
installed PHP 5 (Fedora Core 3) and recompiled it for my Informix DB.
I am able to query the DB using SQL commands and it works.

What I don't get (because I am not knowledgable in HTML) is how to
receive this string of data. I bought a book (PHP 5 Bible) and have
been reading about forms. Is the $_POST command what I need to use?
Once I get this XML string in PHP I think I can handle this until I
have to send back the result. I am guessing another $_POST command?

Also how could I simulate sending this request?

Thanks
Gary

Jul 17 '05 #2

P: n/a
In article <kl********************************@4ax.com>, Gary Quiring wrote:
I am a newbie to PHP and HTML. I need to recieve an XML string from
an outside source that in turns needs to be parsed to read a record
from a database and then return the answer. I have successfully
installed PHP 5 (Fedora Core 3) and recompiled it for my Informix DB.
I am able to query the DB using SQL commands and it works.

What I don't get (because I am not knowledgable in HTML) is how to
receive this string of data. I bought a book (PHP 5 Bible) and have
been reading about forms. Is the $_POST command what I need to use?

First time i searched for this, i always found sites that talked about
$HTTP_RAW whatever... but i didn' have those variables...

Today i do it with:

$xml = file_get_contents('php://input');

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.info>
Jul 17 '05 #3

P: n/a
On Thu, 16 Dec 2004 16:09:04 -0800, "konsu" <ko***@hotmail.com> wrote:
Hello, would you describe your requirements in more detail? Are you
implementing a web application? A web site in other words? Where does the
xml string come from? from the user? How does the user enter it? how is the
response is presented to the user? is the response put in to HTML?

konstantin

The string is coming via the web. They only gave me the XML layout
with no other details. They said I need to provide a URL and they
would send the data to the url. I need to send back a XML response in
the same thread.

Gary

Jul 17 '05 #4

P: n/a
"Gary Quiring" <gq******@msn.com> wrote in message
news:kl********************************@4ax.com...
I am a newbie to PHP and HTML. I need to recieve an XML string from
an outside source that in turns needs to be parsed to read a record
from a database and then return the answer. I have successfully
installed PHP 5 (Fedora Core 3) and recompiled it for my Informix DB.
I am able to query the DB using SQL commands and it works.

What I don't get (because I am not knowledgable in HTML) is how to
receive this string of data. I bought a book (PHP 5 Bible) and have
been reading about forms. Is the $_POST command what I need to use?
Once I get this XML string in PHP I think I can handle this until I
have to send back the result. I am guessing another $_POST command?

Also how could I simulate sending this request?

Thanks
Gary


Use the method that Tim described. For testing, supply a filename instead of
the PHP stream name.
Jul 17 '05 #5

P: n/a
On Thu, 16 Dec 2004 20:20:58 -0500, "Chung Leong"
<ch***********@hotmail.com> wrote:
"Gary Quiring" <gq******@msn.com> wrote in message
news:kl********************************@4ax.com.. .
I am a newbie to PHP and HTML. I need to recieve an XML string from
an outside source that in turns needs to be parsed to read a record
from a database and then return the answer. I have successfully
installed PHP 5 (Fedora Core 3) and recompiled it for my Informix DB.
I am able to query the DB using SQL commands and it works.

What I don't get (because I am not knowledgable in HTML) is how to
receive this string of data. I bought a book (PHP 5 Bible) and have
been reading about forms. Is the $_POST command what I need to use?
Once I get this XML string in PHP I think I can handle this until I
have to send back the result. I am guessing another $_POST command?

Also how could I simulate sending this request?

Thanks
Gary


Use the method that Tim described. For testing, supply a filename instead of
the PHP stream name.

How do I tell my test program to post the data to the URL that is
going to process the XML file?

Thanks
Gary

Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.