Old 15th October 2007, 18:49
oskare100 oskare100 is offline
Junior Member
Join Date: Sep 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP5 / XML API help!

I'm trying to prase and use information I'm getting from an XML API in my system. The user is supposed to be able to choose between the returned agents and then select one of them. When they click "continue" or similar the rows of the agent that the user selected should be saved/assaigned to different PHP variables.

Here is the structure of the XML return:
<message>Your request was successfully processed.</message>
<data index="0">
<agent index="0">
<name>AGENT & CO IT</name>
<address>STREET ADDRESS 2</address>
<agent index="1">
<name>ANOTHER AGENT</name>
<address>STREET ADDRESS 5</address>
Now I need to list the agents so that the user can select one of them.. I've understood that I should use SimpleXML for this since it is the easiest way.

PHP Code:
$xml simplexml_load_file($request_url) or die("feed not loading"); 
That about what I've managed to do, I understand that in some way I need to list the different agents.

PHP Code:
foreach ($xml-> ...? ) (
print ?

Then I would need to add so that the user can select one of the returned agents and click continue and that my script then can get the rows/information about the selected agent. Maybe HTML POST/GET but I don't know how to make it do that...

I appreciate any help, links, code or whatever I can use to solve this problem.

Reply With Quote
Sponsored Links


Thread Tools
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 On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy compiled php5 to another machine cooljai Installation/Configuration 4 11th October 2007 17:15
Problems building php5 wildgoosed Technical 9 29th August 2007 18:33
Ming and PHP5 P Lao Installation/Configuration 3 7th November 2006 11:15
SuSe10.1 & PHP5 modules latcarf Installation/Configuration 3 11th September 2006 15:31
eaccelerator installation - can't find php5-config tom Programming/Scripts 9 15th May 2006 16:36

All times are GMT +2. The time now is 22:00.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.