Call aspx file and receive an answer

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 ? ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-10-2006
rony_16
 
Posts: n/a
Default Call aspx file and receive an answer

Hi,
Does any one know how to call .net file aspx and pass him a parameters
, and get and answer ?
Regards,Rony

Reply With Quote
  #2 (permalink)  
Old 07-10-2006
Erwin Moller
 
Posts: n/a
Default Re: Call aspx file and receive an answer

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
Reply With Quote
  #3 (permalink)  
Old 07-10-2006
Kimmo Laine
 
Posts: n/a
Default Re: Call aspx file and receive an answer

"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)


Reply With Quote
  #4 (permalink)  
Old 07-11-2006
rony_16
 
Posts: n/a
Default Re: Call aspx file and receive an answer


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

Reply With Quote
  #5 (permalink)  
Old 07-11-2006
Kimmo Laine
 
Posts: n/a
Default Re: Call aspx file and receive an answer

"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)


Reply With Quote
  #6 (permalink)  
Old 07-11-2006
rony_16
 
Posts: n/a
Default Re: Call aspx file and receive an answer


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

Reply With Quote
  #7 (permalink)  
Old 07-11-2006
Kimmo Laine
 
Posts: n/a
Default Re: Call aspx file and receive an answer

"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)


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:27 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0