help & direction parsing xml
Moderator: General Moderators
help & direction parsing xml
Hi all!...
it's friday..thx g.d!
Ok, my objectif todayis to be able to read a xml file on a remotre server and display it's information in a select list.
I am posting a $value using a php form and querying the remote server with this value.
This server shoudl return me with a list of results in xml format.
I need to display the results in thelist...
HELP!!!!!!!!!!!!!!!!!
s
it's friday..thx g.d!
Ok, my objectif todayis to be able to read a xml file on a remotre server and display it's information in a select list.
I am posting a $value using a php form and querying the remote server with this value.
This server shoudl return me with a list of results in xml format.
I need to display the results in thelist...
HELP!!!!!!!!!!!!!!!!!
s
- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
refer to XML Parsing Functions in PHP.
i think the manual is filled with examples.....
here is one to parse xml into an array
http://timvw.madoka.be/programming/php/xml2array.txt
and here is one that does more traditional parsing
http://timvw.madoka.be/programming/php/service.txt
here is one to parse xml into an array
http://timvw.madoka.be/programming/php/xml2array.txt
and here is one that does more traditional parsing
http://timvw.madoka.be/programming/php/service.txt
ok, I am getting there slowly....
I have a strange problem.
When trying to access a xml file on a remote server using fopen(http://theaddress of the xml), i am returned with :
Warning: fopen(http://...........) Bad file descriptor.
But if I download the xml file locally (exactely the same from the url above) and link it directly in my code as:
fopen(xmlfile.xml) it works fine..
any suggestions?
s
I have a strange problem.
When trying to access a xml file on a remote server using fopen(http://theaddress of the xml), i am returned with :
Warning: fopen(http://...........) Bad file descriptor.
But if I download the xml file locally (exactely the same from the url above) and link it directly in my code as:
fopen(xmlfile.xml) it works fine..
any suggestions?
s
- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
From PHP Manual...
you need to turn allow_url_fopen to on in php.ini.If PHP has decided that filename specifies a registered protocol, and that protocol is registered as a network URL, PHP will check to make sure that allow_url_fopen is enabled. If it is switched off, PHP will emit a warning and the fopen call will fail.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Please post your code. Google has several threads regarding such an error and firewalls clashing.. http://www.google.com/search?hl=en&q=%2 ... +fopen+php