Page 1 of 1

popfetcher without cron: my idea - bad hack, or ok?

Posted: Sat Mar 18, 2006 9:05 am
by snafu
lacking cron on my vserver i added this line to a html sidebar plugin in my s9y blog to trigger the popfetcher script

Code: Select all

<img src='http://typo.infragelb.de/nano/index.php?/plugin/popfetcher' alt='' />
the idea was to trigger the script every time one loads a page of my blog

it works nice, (just one time i got an server error, "server does not respond" ... maybe a singularity :-) )

my question is whether this is a bad hack using the img tag loading the script, and where the answer of the script does go. to data nirvana?

have a nice day, and: s9y is SO cool!

Re: popfetcher without cron: my idea - bad hack, or ok?

Posted: Sun Mar 19, 2006 8:41 am
by snafu
edit:

i disabled this call to popfetcher because it caused serious hangings of the server, if one reloads the page a bit too frequently.

Re: popfetcher without cron: my idea - bad hack, or ok?

Posted: Sun Mar 19, 2006 1:06 pm
by garvinhicking
Exactly, the problem of that method is that popfetcher takes some time to do its calls.

Instead you might want to think about a javascript that triggers the plugin, or creating a PHP code snippet that you call in your <img src>. That PHP code snippet then creates a lockfile and then could use file_get_Contents() or fsockopen to do the request to your real popfetcher file.

Well, it would all get a bit wicked to code. :)

Regards,
Garvin

Re: popfetcher without cron: my idea - bad hack, or ok?

Posted: Mon Mar 20, 2006 9:58 am
by snafu
garvinhicking wrote:Well, it would all get a bit wicked to code. :)
maybe i'll try the javascript version, this time i call the popfetcher via the browser in my mobile phone.
the best thing should be to have an server with cron, i will change one of my vhost packages to one of these, maybe.

thanks a lot!