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