By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,558 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,558 IT Pros & Developers. It's quick & easy.

Call aspx file and receive an answer

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

Jul 10 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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
Jul 10 '06 #2

P: n/a
"rony_16" <ro***********@gmail.comwrote in message
news:11**********************@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
sp**@outolempi.net | Gedoon-S @ IRCnet | rot13(xv***@bhgbyrzcv.arg)
Jul 10 '06 #3

P: n/a

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

Jul 11 '06 #4

P: n/a
"rony_16" <ro***********@gmail.comwrote in message
news:11*********************@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
sp**@outolempi.net | Gedoon-S @ IRCnet | rot13(xv***@bhgbyrzcv.arg)
Jul 11 '06 #5

P: n/a

Kimmo Laine wrote:
"rony_16" <ro***********@gmail.comwrote in message
news:11*********************@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
sp**@outolempi.net | Gedoon-S @ IRCnet | rot13(xv***@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

Jul 11 '06 #6

P: n/a
"rony_16" <ro***********@gmail.comwrote in message
news:11**********************@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
sp**@outolempi.net | Gedoon-S @ IRCnet | rot13(xv***@bhgbyrzcv.arg)
Jul 11 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.