1

I have an html page that makes a call to a Google api every 500ms. If it gets the right data, it then makes a call to another api with the data.

The solution works well, but it requires a browser window to be open to make the request.

Is there any way I can do this on the back end through php or something similar? I've read about crons jobs but it seems the minimum interval in one minute. My knowledge of the server-side is minimal.

Any help in this area is appreciated.

wibberding
  • 815
  • 3
  • 10
  • 17
  • 1
    Do you have any experience with a programming language or Python? You could set up something called a daemon which is basically just a background process that loops forever until it's told to stopped. – Prime Apr 22 '15 at 01:32
  • 1
    check this link http://www.linuxquestions.org/questions/programming-9/seting-cron-to-run-a-script-every-second-425623/ – Satya Apr 22 '15 at 01:32
  • 4
    If you call a Google API every 500ms forever, they may end up rate limiting you (blocking you). Be sure you know the conditions of use for the API in question. – Eric J. Apr 22 '15 at 01:32
  • 1
    You can run PHP from the command line. You don't need to run it from a browser. http://stackoverflow.com/questions/6965541/run-php-code-in-command-line – Eric J. Apr 22 '15 at 01:33
  • 1
    php daemon. but looks like a bad idea –  Apr 22 '15 at 01:35
  • That's what I needed to know. Thanks all. AlphaDelta you were first. Submit this as an answer and I'll choose it. – wibberding Apr 22 '15 at 04:04

0 Answers0