How to send XML data to a Webpage.
How to send XML data to a Webpage using “POST” Method? Recently I came across an interesting requirement to send XML data to a particular URL using POST, meaning I need to post some XML data to a URL.
XML data is formatted text so, assuming that have the XML text in a PHP variable called, say, $xmltext, you can Post it in a textarea, something like:
Note: I have called the POST parameter "xmltext", but you would have to use whatever name the recipient code expects the XML data to be passed in, together with whateve additional data is required (if any).
<form action="url" method="post">
<textarea rows="99" cols="127" name="xmltext" readonly><?php echo $xmltext;?></textarea>
<input type="submit" value="submit">
P.S. There is probably a much better way of doing it, I just offer this as a thought...
Last edited by jedaisoul; 07-25-2014 at 01:30 PM.
About XML & PHP have a great knowledge dear (jedaisoul)and thanks for share with me Because i really want that for increasing my knowledge so know i got it ....again thanks dear and i hope you will share with me more value able tips and idea,s & guide me in any situation like that....!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)