Hi all,
i have a page in php that needs to do a http post (in the code)
to a .asp page.
or i can send it using a XML envelope.
ive not got much luck posting to the page.
wondering if anyone can see whats up
it has to be from php to asp , i cant change it
here is the xml; i was tring
<?
$url = "http://www.domain.com/insert.asp";
$data = "<score>" . $_POST['value'] . "</score>";
$req = new HTTP_Request($url);
$req->addHeader("Content-Type", "text/xml");
$req->addHeader("Content-Length", strlen($data));
$req->setMethod("POST");
$req->addRawPostData($data, true);
$req->sendRequest();
echo $req->getResponseBody();
?>
it says there is an issue with line 5 first line of req
any points appriceated
i have a page in php that needs to do a http post (in the code)
to a .asp page.
or i can send it using a XML envelope.
ive not got much luck posting to the page.
wondering if anyone can see whats up
it has to be from php to asp , i cant change it
here is the xml; i was tring
<?
$url = "http://www.domain.com/insert.asp";
$data = "<score>" . $_POST['value'] . "</score>";
$req = new HTTP_Request($url);
$req->addHeader("Content-Type", "text/xml");
$req->addHeader("Content-Length", strlen($data));
$req->setMethod("POST");
$req->addRawPostData($data, true);
$req->sendRequest();
echo $req->getResponseBody();
?>
it says there is an issue with line 5 first line of req
any points appriceated