Frontend and backend

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
lopolla
Forum Newbie
Posts: 2
Joined: Tue Aug 13, 2013 7:28 am

Frontend and backend

Post by lopolla »

I have a webpage where I among other things are able to update content. A part of this update takes like 30 seconds because it retrieves external wepages and do stuff to it.

Well what I would like to do is like
1) Click update (registry in database or similar) - and no waiting time
2) Back end does the actual update (retrieve webpages and do stuff) - and registers again that update is done

I am unsure how I am able to pull off this - and I don't wanna use crontab (running it on Linux) - I don't know if I can set up a PHP-listener or something....any suggestions?

Looking forward to hear from you :)
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Frontend and backend

Post by Christopher »

There are several ways to do this, such as forking a process when you click update or using something like Gearman.
(#10850)
lopolla
Forum Newbie
Posts: 2
Joined: Tue Aug 13, 2013 7:28 am

Re: Frontend and backend

Post by lopolla »

okay....I will have to have a closer look into that. Aren't there any built-in ways to handle this sort of thing - like through MySQL - like some PHP-program listening to the database - and if a value changes then it runs code - or something alike?
Post Reply