This is a discussion on Call aspx file and receive an answer within the PHP Language forums, part of the PHP Programming Forums category; Hi, Does any one know how to call .net file aspx and pass him a parameters , and get and answer ? ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
"rony_16" <rony.vainblat@gmail.com> wrote in message
news:1152516601.190694.199750@75g2000cwc.googlegro ups.com... > Hi, > Does any one know how to call .net file aspx and pass him a parameters > , and get and answer ? > Regards,Rony Surely it didn't occur to you to check the previous posts, but it just happens the very same question was answered no longer than 12 hours ago when 'lucyachammond' asked exactly the same question under the topic 'Call an asp script from php'. It doesn't hurt to check the message history. -- "ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg) |
|
|||
|
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 |
|
|||
|
"rony_16" <rony.vainblat@gmail.com> wrote in message
news:1152609940.997605.26370@p79g2000cwp.googlegro ups.com... > "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>" Missing semi-colon ; at the end. > i am .net programer It kinda shows. :) (For those not familiar with asp, code lines aren't ended with a semicolon or any other marker, just by a plain linebreak.) -- "ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg) |
|
|||
|
Kimmo Laine wrote: > "rony_16" <rony.vainblat@gmail.com> wrote in message > news:1152609940.997605.26370@p79g2000cwp.googlegro ups.com... > > "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>" > > Missing semi-colon ; at the end. > > > i am .net programer > > It kinda shows. :) > > (For those not familiar with asp, code lines aren't ended with a semicolon > or any other marker, just by a plain linebreak.) > > -- > "ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk > spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg) :) i know . my mistake . now the error msg is : Fatal error: Call to undefined function curl_init() in k:\home\localhost\www\Test\post.php on line 52 |
|
|||
|
"rony_16" <rony.vainblat@gmail.com> wrote in message
news:1152612763.164544.192130@h48g2000cwc.googlegr oups.com... > :) i know . my mistake . > now the error msg is : > Fatal error: Call to undefined function curl_init() in > k:\home\localhost\www\Test\post.php on line 52 cURL not installed? Check the installation instructions at http://php.net/manual/en/ref.curl.php or: http://zend.com/zend/tut/tutorial-thome3.php -- "ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg) |