I have created a database with *.ram files and I would like to keep track of how many times (column with each song in the db) each one is played i planned on using php to do this somehow but im not sure how i can do this without re-loading the page or poping up a window which I would rather not do...
The way im looking at it is to call xxx.phtml?song_id=4 and xxx.phtml will add the stats to the db and call the *.ram file to stream but is this possible without reloading the page or opening a new page?
Any help would be appreciated
Sure. Simply UPDATE the database, then stream the file.
what would trigger the update though without the page reloading the page and streaming the file? an 'onclick'?
the ram has to be "sent" to the user somehow, in the script which "sends" it, just update the database
myPHPhost.com: we live, eat, sleep PHP
that's what i was afraid of... i was trying to do it without reloading the page... but ill come up with something http://www.SitePoint.com/forums/smile.gif
thanks 4 the help
You can still do it without reloading the page. Send the browser a clearly-marked Real Movie file and it won't show it as an HTML page, it'll download it or let Real Player take over.
PHP can do this easily. Just do the following:
// update your database
// Tell the browser you'll be sending it
// a RAM file
// Send the file
The above PHP script will look like a RAM file to the receiving browser, but will also update your database when it is loaded.
Helping Small Business Grow Online!