Page 1 of 1
Passing values to PHP via XML
Posted: Mon Nov 10, 2003 11:47 pm
by maniac9
Is there a way to send XML data to a PHP script to be parsed, somewhat like using it as an argument. I'm assuming I can't use GET, since the maximum length would most likely be reached, so would posting it via a form work? Anyone have any ideas?
Posted: Tue Nov 11, 2003 3:09 am
by twigletmac
Could you expand a bit on what you're trying to do? PHP can handle XML as a string but I'm not clear on what you are trying to achieve.
Mac
Posted: Tue Nov 11, 2003 9:12 am
by maniac9
Somewhat like an API...
I have a PHP script that will return information, like database entries, in the form of XML. What I would also like to do is be able to supply the script input in the form of XML from some other source, like ASP or Flash.
Posted: Tue Nov 11, 2003 9:47 am
by Jean-Yves
If you use POST instead of GET, then the size limitation is less of an issue. Alternatively, you could get the source program to write to a file that is accessible to your PHP code and which could then be opened and used as the xml source.
As far as I know, the xml parser will scan over a character stream, so opening the file or parsing over the xml string sent via POST should work.
Posted: Tue Nov 11, 2003 4:49 pm
by AVATAr
webservices my dear friend (check nusoap)
Posted: Tue Nov 11, 2003 11:10 pm
by maniac9
With using the POST method, what are the limitations on size?
Posted: Tue Nov 11, 2003 11:38 pm
by volka
depends on what your webserver allows and the value of
post_max_size tells