XML feed and response

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-16-2004
Gary Quiring
 
Posts: n/a
Default XML feed and response

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

Reply With Quote
  #2 (permalink)  
Old 12-17-2004
konsu
 
Posts: n/a
Default Re: XML feed and response

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
>



Reply With Quote
  #3 (permalink)  
Old 12-17-2004
Tim Van Wassenhove
 
Posts: n/a
Default Re: XML feed and response

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>
Reply With Quote
  #4 (permalink)  
Old 12-17-2004
Chung Leong
 
Posts: n/a
Default Re: XML feed and response

"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.


Reply With Quote
  #5 (permalink)  
Old 12-17-2004
Gary Quiring
 
Posts: n/a
Default Re: XML feed and response

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

Reply With Quote
  #6 (permalink)  
Old 12-19-2004
Gary Quiring
 
Posts: n/a
Default Re: XML feed and response

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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0