php - stream updates to database onto website? -


i'm not sure how approach problem, since i'm new web programming. have python program collects keyword specific tweets twitter, adds them mysql database. continuously long program kept running.

now want post tweets collects on website (just start posting tweet text, simple) program enters database, or in real time/as close real time can get. hope makes sense. anyways, how should approach this? thinking either:

1) have python send tweet text directly website using ajax? 2) have website html/javascript/php use ajax ask mysql if there new updates, if so, post new tweets...or need in reverse ajax?

any advice or suggestions appreciated!

javascript ajax... use jquery mixed in here:

$(document).ready(function(){      setinterval(function(){          $.ajax({            //call php script returns new tweets mysql in table form or other          }).done(function(response){          $('#displaydiv').append(response);          });      }, 1000);//every 1 second 

});


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -