XML feed and response

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gary Quiring

    #1

    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

  • konsu

    #2
    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.c om> wrote in message
    news:kl44s0da9b dpk0mt88dnu50u9 jotlotcv4@4ax.c om...[color=blue]
    >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
    >[/color]


    Comment

    • Tim Van Wassenhove

      #3
      Re: XML feed and response

      In article <kl44s0da9bdpk0 mt88dnu50u9jotl otcv4@4ax.com>, Gary Quiring wrote:[color=blue]
      > 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?[/color]


      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_conten ts('php://input');

      --
      Met vriendelijke groeten,
      Tim Van Wassenhove <http://www.timvw.info>

      Comment

      • Gary Quiring

        #4
        Re: XML feed and response

        On Thu, 16 Dec 2004 16:09:04 -0800, "konsu" <konsu@hotmail. com> wrote:
        [color=blue]
        >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[/color]
        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

        Comment

        • Chung Leong

          #5
          Re: XML feed and response

          "Gary Quiring" <gquiring@msn.c om> wrote in message
          news:kl44s0da9b dpk0mt88dnu50u9 jotlotcv4@4ax.c om...[color=blue]
          > 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[/color]

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


          Comment

          • Gary Quiring

            #6
            Re: XML feed and response

            On Thu, 16 Dec 2004 20:20:58 -0500, "Chung Leong"
            <chernyshevsky@ hotmail.com> wrote:
            [color=blue]
            >"Gary Quiring" <gquiring@msn.c om> wrote in message
            >news:kl44s0da9 bdpk0mt88dnu50u 9jotlotcv4@4ax. com...[color=green]
            >> 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[/color]
            >
            >Use the method that Tim described. For testing, supply a filename instead of
            >the PHP stream name.
            >[/color]
            How do I tell my test program to post the data to the URL that is
            going to process the XML file?

            Thanks
            Gary

            Comment

            Working...