Thanks guys.

I researched a bit more and I talked about this a bit with Dapatrick on IRC.

 I have to exclude the pur _javascript_. You linked me to tiddlywiki.com which is great, but js cannot send  headers and I'm pretty afraid of the performances load.

I thought about Cake to build the interface, lookup the db, etc. I'm pretty sure the hardest part is to build the bot himself.
there seems to be a nice DOM extension in PHP5 so I think I will require that from the client. To query  the website there is some functions in PHP4 even though
I never used them. The scheduled thing was just an idea from me and is not required by the client. I'm quite surprised it seems there is no "standard" way to do this. (Does that mean php is a "query-based" language?). I'd like to be able to write a "simple perl script" but I dunno that language yet. I'm not a real programmer I'm comming more from the wemaster/"pseudo-IT school" background :-P
I guess its possible to do it with cake as long as I can change the max execution time.  I see it like this :

1.A component to connect and grab the needed value on website.
2.A method that takes the list of url and loop in it to run the component.
3.A method to lookup the current state of the grabbing that will be called through ajax.
4. ...

What do you think ?

Olivvv


John Zimmerman [gmail] wrote:
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