|
Posted by Timothy Murphy on 10/05/00 11:23
Erwin Moller wrote:
>> My question is: how can I download a timetable
>> from a remote URL
>> <http://www.irishrail.ie/your_journey/timetables.asp>
>> after giving a number of values like txtFromStation=Salthill .
> If you just need to open a file or URL, you can use fopen:
> Read more here:
> http://nl3.php.net/manual/en/function.fopen.php
> If you need to POST data (like it came from a form) you might have a look
> at curl.
> Read more here:
> http://nl3.php.net/manual/en/ref.curl.php
> But in general: If this is you first day on PHP, you better spend your
> time in a good book first.
> Try to do all you learn in the book first, THEN start on a real project.
> In my experience: When learning something new, spend some real time in a
> good book (or site) first.
> In the end you will finish faster than learning it the hard way, that is
> trail and error.
Thanks for your URLs, which I am looking at now.
But as to your last remarks,
I glanced (30 seconds) at a couple of PHP books,
and it seemed to me that they were entirely devoted to
the topic of using PHP in a web _server_.
I'm not interested in this as I don't run a web server.
I'm only concerned with the question if one can use PHP
to query a remote server,
and if so exactly how does one go about it?
I gather I could get the information I want (a timetable)
from the server in question by pointing the browser at the URL,
with the specific variable values at the end
as part of the URL.
I guess my question is, can one query a form on a remote server
in the same way by using a PHP script?
If so, how exactly does one do it?
One problem I have with the PHP tutorials I've glanced at
is that while they have reams about PHP syntax
they very rarely tell you exactly what command
you are supposed to use to invoke their scripts.
It is as though this information was given in section -1
before the tutorial started.
--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
Navigation:
[Reply to this message]
|