Re: PHP as a web browser?
| From: | Stefan Rusterholz | Date: | Mon, 17 Dec 2001 10:14:25 +0000 |
| Subject: | Re: PHP as a web browser? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77924@lists.php.net to get a copy of this message | ||
if you want a php-only solution, you should probably also consider
fsockopen.
http://www.php.net/manual/en/function.fsockopen.php
best regards
Stefan Rusterholz
----- Original Message -----
From: <Lawrence.Sheed@dfait-maeci.gc.ca>
To: <david@coolcomputing.com>
Cc: <php-general@lists.php.net>
Sent: Monday, December 17, 2001 9:26 AM
Subject: RE: [PHP] PHP as a web browser?
> you may want to look at the curl functions as a start.
>
> thats most of the functionality down already. otherwise you'll have to
> parse raw data. not too hard, but can be painful to keep stateful info.
>
> you'll also have to rewrite code when the interface changes, you'll
probably
> want to look at hotscripts or manuel lemos's script archives for
prewritten
> html parsers.
>
> fopen/fread/fwrite is the way to go, but you'll need to interpret that
data
> accordingly. Look at the rfc's on cookies and html if you are interested
in
> going that route.
>
> been there done that myself (for a sms autosend script using mtnsms, but
its
> a pia to start from scratch...)
>
>
> Lawrence
>
> -----Original Message-----
> From: David Yee [mailto:david@coolcomputing.com]
> Sent: December 17, 2001 3:49 PM
> To: php-general@lists.php.net
> Subject: [PHP] PHP as a web browser?
>
>
> Is it possible to have PHP act like a web browser, accept cookies and post
> data (for login)? I'm not sure exactly where to start- I know you can use
> fopen/file to retrieve url's but I'm not too sure about the other steps.
I
> would like to write and run such a php script as a cron job and have it do
> something like log into my web-based email account, retrieve emails,
process
> them, save them locally, and then delete them on the server. Thanks for
any
> help.
>
> David
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>