The hardest part here is going to be the "logs in" step.  Everything else can be done with pretty much any scripting language.  For the automation you will need to use a cron job or whatever the schecduling agent is on your host platform.

If I am understanding things correctly you are wanting to build the "bot" using cake.  If that is the case, cake really is not the best tool for the job.  A simple perl script will be much easier to get the task done.

I wrote a perl script a while back that logged into an old PHP wiki that was password protected using standard .htaccess file.  It then scraped the stats page and calculated who had the most edits on the wiki.  The results of the "top 10" were then appended to a text file at the end of every day.  The script ran as a cron job on a linux box.

The login step depends on how the login/authorization is done on that site.  If you are running the site then you can change it as needed.


On 6/16/06, Darian Anthony Patrick <[EMAIL PROTECTED]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Olivvv,

The first question could be answered by using an external script which
makes an HTTP request to your Cake application, invoked from cron.

Cake could also, in theory, be used as a generalized application
development framework, when coupled with a daemon that handles
time-based action invocation, vaguely similar to POE in Perl.

I believe the second question could be answered by using generally
available PHP classes, or core or extensions fuctions which handle HTML,
or text parsing.

All in all, it sounds quite feasible.

And fun.

Best,

Darian

Olivier Percebois-Garve wrote:
> Hi
> I got a proposal for a job and I'm trying to figure out how difficult it
> is and how long it would take.
>
> The job is to make a bot that connects to an external url, logs in,
> catch somewhere on the page the number in front of the string "treffer",
> save it and then start again with another url.
>
> So I have several questions:
>
> Can cake run code without a query (every night for instance) ?
> Can cake (or something else) open external urls and walk through the DOM
> of the opened page ?
>
> Olivvv
>
>
>
>
> >

- --
Darian Anthony Patrick <[EMAIL PROTECTED]>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEkykzKpzEXPWA4IcRAlmyAJkBGwozs+TmY9yyAzSdz1Cxp4p7TQCfUD3g
kDSnz3povRiK5jLO5jpxzPU=
=YEGc
-----END PGP SIGNATURE-----



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to