This is a discussion on XML feed and response within the PHP Language forums, part of the PHP Programming Forums category; I am a newbie to PHP and HTML. I need to recieve an XML string from an outside source that ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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" <gquiring@msn.com> wrote in message news:kl44s0da9bdpk0mt88dnu50u9jotlotcv4@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 > |
|
|||
|
In article <kl44s0da9bdpk0mt88dnu50u9jotlotcv4@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> |
|
|||
|
"Gary Quiring" <gquiring@msn.com> wrote in message
news:kl44s0da9bdpk0mt88dnu50u9jotlotcv4@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. |
|
|||
|
On Thu, 16 Dec 2004 16:09:04 -0800, "konsu" <konsu@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 |
|
|||
|
On Thu, 16 Dec 2004 20:20:58 -0500, "Chung Leong"
<chernyshevsky@hotmail.com> wrote: >"Gary Quiring" <gquiring@msn.com> wrote in message >news:kl44s0da9bdpk0mt88dnu50u9jotlotcv4@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 |