xml transfer
Moderator: General Moderators
- mudkicker
- Forum Contributor
- Posts: 479
- Joined: Wed Jul 09, 2003 6:11 pm
- Location: Istanbul, TR
- Contact:
xml transfer
anyone have any idea how to send xml data to an url?
- Buddha443556
- Forum Regular
- Posts: 873
- Joined: Fri Mar 19, 2004 1:51 pm
from http://www.php.net/curl by mmm at turkmenweb dot com:
Looks like you put in a post.
Code: Select all
<?php
$XPost = "<XMLcontent>sameas above</XMLcontent>"
$url = "..same URL as above..";
$ch = curl_init(); // initialize curl handle
curl_setopt($ch, CURLOPT_URL,$url); // set url to post to
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 4); // times out after 4s
curl_setopt($ch, CURLOPT_POSTFIELDS, $XPost); // add POST fields
$result = curl_exec($ch); // run the whole process
echo $result; //contains response from server
?>Don't know exactly what you are looking for, but i think http://pear.php.net/packages.php?catpid ... b+Services might be usefull