You are here: Re: a gentle nudge « PHP Programming Language « IT news, forums, messages
Re: a gentle nudge

Posted by Rik on 12/16/06 21:41

pangea33 wrote:
> 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.

Use cURL:
http://www.php.net/manual/en/ref.curl.php

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

Well, as you indeed state later one of the several XML packages. DOM, DOM
XML, XML, all possibilities. It depends what's possible on the server and
what suits your needs.

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

cURL is all that is needed to get the information. When in doubt, try to
inspect the headers sent to and from a site when trying to get the XML
manually, and mimique this in cURL.

For parsing the returned XML you have loads of options, even 'by hand' if
it's a very small file.
--
Grtz,

Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация