Re: a gentle nudge




Your Name wrote:
All,

I volunteered for a church project whereby I need my PHP page to send
off a HTTP request to third party web site that provides a service.
That service sends back a small XML file of information. My PHP page
should capture that response, parse the XML, and display the information
received.

I spent probably hours looking through the function list and still have
not determined which package does what I need. There's the http package
that seems like is what I need for my page to send out the request, but
there are no examples and very little documentation on using these tools
(on php.net)...

Then, how do I capture the data stream sent back from that remote
website? Is that part of the http package, too, or do I need something
else?

I'm confident I can use domxml_xmltree() to parse the string I get back
into something more useable...

I probably don't need a dissertation on how to do it, but just a gentle
nudge to point me to the basic packages I need to dig into more deeply.
But if you want to send a dissertation, I'd be delighted at what I
could learn!

Mark

Can you provide some info about what you want to do in terms of user
interface? Do you want to execute the call and parse the returned
content when a user clicks something, or do you want to run this
periodically as a system process?

The first would be an example like returning a weather forecast when a
user enters a zipcode, and would best be implemented using something
like an AJAX request that is launched by a user. You could send the
request directly to the other site, and then process the response.

The second might be something like grabbing the days postings from a
forum, which would be saved locally once per night. This would likely
use a cron entry to fire off a php page that could handle data returned
from the target website through the use of CURL,

.



Relevant Pages

  • Re: undefined function error if I use a fully-qualifed include
    ... >>obtains filename.php by performing an HTTP request to the specified ... which specifies "Go and get this resource using the HTTP protocol". ... PHP doesn't ... off to Apache to satisfy. ...
    (comp.lang.php)
  • Re: DES Encryption Java for the Basic authentication PHP
    ... HTTP Basic Authentication uses no encryption at all. ... The web server checks the HTTP request packet for a special ... Now you can use this with PHP. ...
    (comp.lang.java.programmer)
  • a gentle nudge
    ... I volunteered for a church project whereby I need my PHP page to send off a HTTP request to third party web site that provides a service. ... Is that part of the http package, too, or do I need something else? ...
    (comp.lang.php)
  • Re: newbie questions...
    ... > are there any good PHP compilers... ... with PHP must go over HTTP (using a HTTP GET or HTTP POST request). ... Connectionless interactions don't allow sessions to "persist". ...
    (comp.lang.php)
  • Re: [PHP] Re: File Upload - post_max_size and upload_max_filesize in GBs
    ... So it seems applet posts complete data to that php file handling script,*as soon as upload button is clicked*, rather than uploading first and then posting to php. ... As that seems to be the case; there is no real benefit in using applet (in case of http) other than that progress bar which is already supported by php 5.2 ... I think you need to read up on how an HTTP POST request works when it's handled by PHP because some of what you've written there indicates that you don't quite have it. ...
    (php.general)