473,503 Members | 3,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Call an asp script from php

I have a 3rd party real-estate website written in php. I would like to
call an asp script on a separate webserver each time a new real-estate
item is added to the database on the php site.

The asp script updates a sql server database for another site and once
the page has been called, I do not need any return information from it.
I have searched the groups but cannot find a definitive way of making
the call to the asp script - I am a asp programmer, new to php so any
help would be much appreciated.

Jul 9 '06 #1
4 2864
On 9 Jul 2006 12:36:38 -0700, lu***********@yahoo.co.uk wrote:
>I have a 3rd party real-estate website written in php. I would like to
call an asp script on a separate webserver each time a new real-estate
item is added to the database on the php site.

The asp script updates a sql server database for another site and once
the page has been called, I do not need any return information from it.
I have searched the groups but cannot find a definitive way of making
the call to the asp script - I am a asp programmer, new to php so any
help would be much appreciated.
fopen can (under the most common configuration, although it can be disabled)
open URLs as if they were files, so you can use that to make a GET request to
an ASP page. http://uk.php.net/fopen

For more complex cases (POST, cookies, finer control over timeouts etc.)
there's cURL: http://uk.php.net/manual/en/ref.curl.php

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jul 9 '06 #2
Many Thanks Andy,
That works fine!
Andy Hassall wrote:
On 9 Jul 2006 12:36:38 -0700, lu***********@yahoo.co.uk wrote:
I have a 3rd party real-estate website written in php. I would like to
call an asp script on a separate webserver each time a new real-estate
item is added to the database on the php site.

The asp script updates a sql server database for another site and once
the page has been called, I do not need any return information from it.
I have searched the groups but cannot find a definitive way of making
the call to the asp script - I am a asp programmer, new to php so any
help would be much appreciated.

fopen can (under the most common configuration, although it can be disabled)
open URLs as if they were files, so you can use that to make a GET request to
an ASP page. http://uk.php.net/fopen

For more complex cases (POST, cookies, finer control over timeouts etc.)
there's cURL: http://uk.php.net/manual/en/ref.curl.php

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jul 11 '06 #3
I am now trying to call my asp script but have having problems with the
parameters I am passing. My code is below:

$handle =
fopen("http://www.homeplots.co.uk/processhpdetails.asp?postcode={$this->zip}&city={$this->city}&price=$this->price&caption={$this->caption}&id=$this->property_id&type=$this->type",
"r");

I get the error:
Warning:
fopen('http://www.homeplots.co.uk/processhpdetails.asp?postcode=MK17
0SJ&city=Swanbourne&price=125000&caption=Building Plot in
Swanbourne&id=78&type=SF'): failed to open stream: No such file or
directory in
/home/fhlinux185/h/homeplots.eu/user/htdocs/property_class.php on line
486

The asp file definately exists but I cannot pass it the parameters. I
think the problem is to do with passing strings but do not know php
well enough to figure it out.

Again, any help much appreciated.
Lucy

lu***********@yahoo.co.uk wrote:
Many Thanks Andy,
That works fine!
Andy Hassall wrote:
On 9 Jul 2006 12:36:38 -0700, lu***********@yahoo.co.uk wrote:
>I have a 3rd party real-estate website written in php. I would like to
>call an asp script on a separate webserver each time a new real-estate
>item is added to the database on the php site.
>
>The asp script updates a sql server database for another site and once
>the page has been called, I do not need any return information from it.
I have searched the groups but cannot find a definitive way of making
>the call to the asp script - I am a asp programmer, new to php so any
>help would be much appreciated.
fopen can (under the most common configuration, although it can be disabled)
open URLs as if they were files, so you can use that to make a GET request to
an ASP page. http://uk.php.net/fopen

For more complex cases (POST, cookies, finer control over timeouts etc.)
there's cURL: http://uk.php.net/manual/en/ref.curl.php

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jul 11 '06 #4
Rik
lu***********@yahoo.co.uk wrote:
I am now trying to call my asp script but have having problems with
the
parameters I am passing. My code is below:

$handle =
fopen("http://www.homeplots.co.uk/processhpdetails.asp?postcode={$this->zip}
&city={$this->city}&price=$this->price&caption={$this->caption}&id=$this->pr
operty_id&type=$this->type",
"r");

I get the error:
Warning:
fopen('http://www.homeplots.co.uk/processhpdetails.asp?postcode=MK17
0SJ&city=Swanbourne&price=125000&caption=Building Plot in
Swanbourne&id=78&type=SF'): failed to open stream: No such file or
directory in
/home/fhlinux185/h/homeplots.eu/user/htdocs/property_class.php on line
486

The asp file definately exists but I cannot pass it the parameters. I
think the problem is to do with passing strings but do not know php
well enough to figure it out.

Again, any help much appreciated.
Lucy

First of all, rawurlencode() your parameters, 'Building Plot in Swanbourne'
should be 'Building%20Plot%20in%20Swanbourne'.

If that doesn't work, check allow_url_fopen:
http://www.php.net/manual/en/ref.fil...llow-url-fopen

Grtz,
--
Rik Wasmus
Jul 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5262
by: Greg Chapman | last post by:
I am at my wit's end trying to get information out of Streamline.net's support dept about my problem. They reply quickly enough, but seem to try and give out the least possible amount of info each...
5
1912
by: Mario Thiel | last post by:
Hello, i am new to JavaScript and right now i am learning Call by Value. i tryed to write a small script but somehow it doesnt work right. i cant put <br> into it, and i can only put the...
4
4106
by: Christian | last post by:
From a not even newbie: Without knowing much about Python (yet) I'm trying to install the CMS Zope via FTP (with the well documented changes to make it work on an Apache server). By birth Zope...
4
3153
by: dennise9 | last post by:
My exeternal JS works fine when the call is placed in the page head or body. But if I call the same javascript from a (clicked) text link on the page, the script throws a JS error when it...
7
9907
by: Wladimir Borsov | last post by:
I want to call a perl script myscript.pl in my cgi-bin from a HTML web page. This call should NOT use SSI (because in this case HTTPS://.... protocol is necessary). Furthermore NO button click...
3
1929
by: Marshall | last post by:
Hello, I am wondering if it is possible to call a remote web service using ATLAS and if so, how. I have read several docs which show how to call a web service that is within the same project as...
2
2076
by: harishdixit1 | last post by:
Hello friends i developed a tollbar for Firefox browser. Now This toolbar contains a menu item. A web page will be opened by the user of the Toolbar. This Web page source code has included many .JS...
19
3802
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
11
11505
by: yangsuli | last post by:
i want to creat a link when somebody click the link the php script calls a function,then display itself :) i have tried <a href=<? funtion(); echo=$_server ?>text</a> but it will call the...
3
3644
by: Angus | last post by:
I have a web page with a toolbar containing a Save button. The Save button can change contextually to be a Search button in some cases. Hence the button name searchsavechanges. The snippet of...
0
7258
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7313
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6970
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7441
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1489
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.