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

Creating and modifying plugins.
Post Reply
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

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

Post 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!
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

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

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

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

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

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

Post 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!
Post Reply