473,395 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

a gentle nudge

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
Dec 16 '06 #1
4 1175
sometimes it's called page scrubbing (or it's at least related to it),
search for that and php and you might get somewhere.
Another source is the Book PHP Hacks which discusses it.

I haven't tried it yet so that's all I can offer.

Larry

Dec 16 '06 #2

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,

Dec 16 '06 #3
Rik
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
Dec 16 '06 #4
Not sure but the response fro the other website may be SOAP so these
functions may help you out: http://au3.php.net/soap

Dec 18 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Jeff Melvaine | last post by:
I note that I can write expressions like "1 << 100" and the result is stored as a long integer, which means it is stored as an integer of arbitrary length. I may need to use a large number of...
2
by: MJ | last post by:
Can anyone recommend a Windows program with the already-configured ability to do what BBEdit's "Gentle Hierarchical" formatting option does? I'm trying to clean up some HTML files on a PC, but I...
5
by: Woodmon | last post by:
Example of my CSS follows: <style type="text/css" media="screen"> BODY { color: white } A:link { color: 66CCFF; } A:visited { color: CC66FF; } A:active { color: CC66FF; } A:hover {...
1
by: AmR EiSa | last post by:
Hi I try to make form nudge like MSN Messenger and Yahoo Messenger by this code in vb.net Me.Top = Me.DesktopLocation.Y - 6 Thread.Sleep(30) Me.Top = Me.DesktopLocation.Y + 6...
17
by: Joe | last post by:
I'm a long-time lurker, so I know what to expect! Can someone please look at this and make appropriate comments? http://members.aardvark.net.au/grakat/temp/ It's only four pages, and it should...
1
by: champion | last post by:
I am using jdk1.4. i am in need of a gentle introduction to Java. please give me links. Thank you guys
0
by: HockeyFan | last post by:
I've got Gentle.Net objects bound to an ObjectDataSource. I have a grid that comes up fine. I then have a DetailView that is bound to another ObjectDataSource. When I try to update from the...
2
by: dutsnekcirf | last post by:
I found this article on how to nudge the treenode items up or down in the order of a treeview control. The problem is it's in C# and I know nothing about C#. In fact, C# scares me (I think it's the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.