When POST data is sent to a page, it's as if somebody typed the text into a
textarea and hit a submit button. Even though this is being done
programmatically, the POST method will behave the same. SOmebody in their
(your)code will have to write something similiar to:
$postData = xVar= . rawurlencode( ?xml version=\1.0\sometag
value=\some value\/xml );
PostToHost( http://www.domain.com; /phpfile.php, $postData );
then your script would access that XML data through the
HTTP_POST_VARS['xVar'] or $xVar as normal
/* not my function, found on some PHP site */
function PostToHost( $host, $path, $data_to_send ) {
$cRetVal = ;
$fp = fsockopen( $host, 80 );
fputs( $fp, POST $path HTTP/1.1\n );
fputs( $fp, Host: $host\n );
fputs( $fp, Content-type: application/x-www-form-urlencoded\n );
fputs( $fp, Content-length: . strlen($data_to_send) . \n );
fputs( $fp, Connection: close\n\n );
fputs( $fp, $data_to_send );
while( !feof( $fp )) {
$cRetVal .= fgets( $fp, 128 );
}
fclose( $fp );
return $cRetVal;
}
XML file is text file. If I open the file with php like call $fp,
that is a long string with some special char.
post method can send a long string to the server.
how php can receive that long string is my problem.
if can do that, php can parser the xml file send form remote
computer. I want php parser the SOAP message
--
Yorgo Sun
Project Manager
Technology Dept. Tom.com
Email:[EMAIL PROTECTED] Mobile:13701243390 Phone:65283399-121 TomQ
ID:yorgo http://www.ruisoft.com
Johan Holst Nielsen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I think you understand my problem.
I will use a client program to POST the XML data to a php file
on the server base HTTP
in php file will get the post request,
the question is, how can i get the xml data in post request
Hmm, I dont think I understand? Where do you want to do with the
XML? Cant you just make a echo() in a xml document? please
explain? ?xml version='1.0'?
...
...
?php
echo $xmldatavar;
?
...
...
...
Regards,
Johan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]