![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jun 2007
Posts: 187
|
secure flash player
Currently i am using jeroenwijering flash player, but this exposes the file url of flv files. Does anyone know of a more secure player that can hide the url's of flv files? Right now I am using js to protect it alittle by creating the player dynamically. I know that you can not stop ripping completely but you can stop 50% of the people that just look at page sources.
I tried a php file such as: PHP Code:
but this made my browser crash (firefox) and server resources sky rocket!
__________________
Need some web dev? Contact ME ICQ - 366621126 |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Dec 2006
Posts: 179
|
$file should probably be the absolute path to the folder
something like $file = "home/wwwroot/public_html/video/" |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Dec 2006
Posts: 179
|
actually you should put the .flv files outside of the public_html directory so they are not accessible from the web.
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jun 2007
Posts: 187
|
ok this is what i have now:
flv files are located outside my webroot the file path is '/home/username/movies/' the code in stream.php is: PHP Code:
my browser will download the file only named stream.php which is correct, its able to get the file. I dont know if there is a problem that it could be returning as a .php file and the player will not play it? but if i try to play it in the flash player it just sits there with the flash logo going, like its trying to find the file. the code for the player that i am loading is: PHP Code:
that site seems to be down or i would be there too.
__________________
Need some web dev? Contact ME ICQ - 366621126 |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: May 2007
Posts: 1,152
|
thanks for the info!
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Jun 2007
Posts: 187
|
ok i have my player working with stream.php?file=video.flv This works and well. The files are located outside my web root so only this script will be able to access them. But how do i protect this script so that people dont just put that in the url line and are able to dl my movie?
i have tried: Code:
if (!$_SERVER['HTTP_REFERER']){ print "This page can't be accessed directly. Please click back to start over."; } Code:
if (!defined("Something_was_defined_on_previous_page")) { die ("Don't waste your time trying to access this file"); }
__________________
Need some web dev? Contact ME ICQ - 366621126 |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#7 |
Registered User
Join Date: Jun 2007
Location: Vancouver, BC
Posts: 6
|
This is an interesting question.
With the first example if $_SERVER['HTTP_REFERER'] doesn't evaluate to whatever php thinks of as false it won't work. If you tested for a specific refererrer it might however. One way to do this where there may be many possible "right" answers would be to use a regular expression: if (!preg_match('#^http:/+mydomain.com#',$_SERVER['HTTP_REFERER'])) die("can't view this link directly!"); I'm wondering if apache config could be doctored in some way to prevent this eg using mod_rewrite. |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Jun 2007
Posts: 187
|
well after some testing by echoing out $_SERVER['HTTP_REFERER'] and others, there is no http_referer at least stream.php does not see one! i am kinda lost with this. the only other thing that i know to do would be to create key like db entries per users ip address that has a timeout limit set to it. say grab the time and user ip, encode that, throw it in the db. then when calling stream.php pass the users ip and compare that to the encoded db entry and compare the time thats with it and do a compare. say it was inserted into the db 5 mins ago is ok, 6 mins no timeout if thats ok stream.php passes the video file.
__________________
Need some web dev? Contact ME ICQ - 366621126 |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Dec 2006
Posts: 179
|
You could use a session id.
Create the original page with php and pass the session id through the link calling the flash file stream.php?flash.flv&id=SDFJSFOIW$WH then have stream php check the session id passed to the one being used for the current session. If it matches create the flv and pass it. |
![]() |
![]() ![]() ![]() ![]() |