Quote:
Originally Posted by sortie
Build a table with the content size of each piece of media.
Use a redirect script (like traffic trading: /cgi-bin/media.cgi?url=/themedia.mpg) to print "location: /themedia.mpg\n\n"
The redirect script reads the content size table based on the url and adds to a cookie and IP file the total amount of bandwidth and redirects to an error page if bandwidth exceeded.
There's several other ways but this is probably the easiest.
Using htaccess to hide the redirect script can help make it harder to defeat.
|
good idea, but this assumes that the person viewed the entire file... so if the mpg file is 400meg, and they got their satisfaction around 100meg point, then they got "over charged" (assuming content was streaming vs. downlaoded as a whole clip).
you can have a background cron job that runs every minute that does b/w stat checks by IP (as you were thinking) to fill in a table, and your PHP script checks that table based on IP. (this method would help with streamed content)
Most ppl have the same IP during their session with you... AOL users can have IP change in the middle of their time on your site...
Fight the .02!