|
Posted by rony_16 on 12/17/41 11:53
Erwin Moller wrote:
> rony_16 wrote:
>
> > Hi,
> > Does any one know how to call .net file aspx and pass him a parameters
> > , and get and answer ?
> > Regards,Rony
>
> Hi ROny,
>
> One can call ANY page (http) using CURL.
> Read on here:
> http://www.php.net/curl
>
> It doesn't matter which language produced the page, as long as it is
> reachable via a http request.
>
> Regards,
> Erwin Moller
Hi ,
Thank you for your guidance .
I did downloaded the curl file (curl.exe binary file) by the link in
the first post .
but how do i make it work .
i tried to copy the file to the php dir and even in the apache dir .
i searched in google all day ,but still i am getting an error
"Parse error: syntax error, unexpected T_VARIABLE in
z:\home\localhost\www\Test\post.php on line 51"
the code that i write is :
$XPost = "<XMLcontent>sameas above</XMLcontent>"
$url = "http://www.example.com";
$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
i am .net programer , so do not know php , the reason i do that is to
integrate an .net site with php site .
Please help , Rony
Navigation:
[Reply to this message]
|