![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
![]() - FOR VIDEOS -
ok as requested i will post source here.. you are welcome to clean up the code. I have posted the easiest method here as an example , there are quite a few additional things you can add to provide more security.. ok here goes for this example were assuming you have a folder called protected on your server EXAMPLE yourserver.com/protected/ so lets start off with making a folder called "protected" on your server. Inside that folder should be 2 folders , one we will call "videos" and another we will call "secret" paths should look like this yourserver.com/protected/videos and yourserver.com/protected/secret ok save the following as ".htaccess" and upload to the folder called "videos" Code:
rewriteengine on rewriterule ^(.*)\.wmv$ http://www.yoursite.com/protected/?in=$1 [nc] rewriterule ^(.*)\.jpg$ http://www.yoursite.com/protected/img.php?in=$1 [nc] ok now copy the following code and save as index.php in the folder "protected" Code:
<?php $in = $_GET['in']; $sip = getenv("REMOTE_ADDR"); $fol = "log.dat"; $sc = file_get_contents($fol); if (preg_match ("/$sip/", $sc)) { header("Location: http://yourserver.com/protected/secret/$in.wmv"); } else { header("Location: http://yourserver.com/protected/x.wmv"); } ?> Code:
<?php $sip = getenv("REMOTE_ADDR"); $in = $_GET['in']; $fol = "log.dat"; $sc = file_get_contents($fol); $wrt = "$sip\n$sc"; $wrt = substr($wrt, 0, 10000); if (preg_match ("/$sip/", $sc)) { // access granted already } else { $hn = fopen($fol, 'w+'); fwrite($hn, $wrt); fclose($hn); } $ft = "http://www.united.com/ual/asset/green_check_12x12.gif"; header("Location: $ft"); ?> ok now all your video links should now point to yourserver.com/protected/videos/example.wmv in order for the videos to work the surfer will have to have seen the following image yourserver.com/protected/videos/access.jpg so if your doing fhg's you should put that image on every page somehwere , doesnt matter the size so if you just wanna make it a hidden image you could zero the width/height. Or you could tie the forward in the img.php to a banner you should put a file called x.wmv in the "protected" directory to represent the default BAD VIDEO or you can simply modify the link to a website " ps i recommend using a flash file here because if the user is trying to hotlink your video in a website it would just show a dead video , wheras if you use a flash file as the link it would play your flash video when they try and hotlink it In the img.php you should point to a small picture or you can tie this into a banner. what the img.php is for is a security check to make sure the user has viewed the picture first. , when the image is viewed it logs your ip to the log.dat file , when a user attempts to view the video it checks the log.dat to make sure your ip is found. if not it sends to the x.wmv , if it is found it sends you to the proper videos The REAL videos should go in the "secret" folder as pointed in index.php. The real video url could be detected so its essential you rename this every now and then in the index.php and the actual folder.. you wont have to change your existing links on your pages at all , just the folder and the pointer in the index.php p.s. as i mentioned , there are quite a few things you can do to make this more dynamic, i'm more than happy to help anyone with specific customization. for ease of use i have posted the easiest method for fastest load If you have any q's ask If you make a cool mod to this please share / post
__________________
hatisblack at yahoo.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Industry Role:
Join Date: Dec 2004
Location: Happy in the dark.
Posts: 93,114
|
I Heart You Smokey!
__________________
FLASH SALE INSANITY! deal with a 100% Trusted Seller Buy Traffic Spots on a High-Quality Network 1 Year or Lifetime — That’s Right, Until the Internet Explodes! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Too lazy to set a custom title
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
|
Good tip Smokey.. While I know this protects from direct linking, do you feel doing it this way creates less .htaccess / video playing problems?
I use a script to create symlinks with a random dir name, that can only be called by the root domain. However if your way makes videos work without any issues related to the .htaccess files - then this is better way to link the videos for serps.
__________________
![]() ![]() ![]() It's all disambiguation ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Too lazy to set a custom title
Industry Role:
Join Date: Jan 2001
Posts: 51,692
|
Gotta bookmark this and try it when I get back home.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
Quote:
![]() well in the example posted i forgot to mention it only covers .wmv if you wanted it to cover multiple filetypes in the same folder you might have problems, gotta make a few mods for that
__________________
hatisblack at yahoo.com |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Aug 2006
Posts: 7,875
|
thread bookmarked trhanks
__________________
![]() Join the fucking best in big tit sponsors!!! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: May 2004
Posts: 506
|
This is very cool. I'm looking forward to your modifactions to protect the other videos.
So far I've been embedding my videos in flash files to stave off hotlinkers this looks like it will be far less labor intensive. -A |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
you have to remove ips at some point from the log files? otherwise it will keep growing till it kills apache?
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: Jul 2005
Location: adult.extremegraphicdesign.com
Posts: 431
|
very nice tutorials.
*bookmarked!* ![]()
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
Quote:
![]()
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
Quote:
edit lol i see your reply now whoops
__________________
hatisblack at yahoo.com |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
ok heres how you modify it to do multiple filetypes
the htacess should look like this notice how it has a line for wmv and mpg, just copy that line and modify for the filetypes you need to add Code:
rewriteengine on rewriterule ^(.*)\.wmv$ http://www.yoursite.com/protected/?end=wmv&in=$1 [nc] rewriterule ^(.*)\.mpg$ http://www.yoursite.com/protected/?end=mpg&in=$1 [nc] rewriterule ^(.*)\.jpg$ http://www.yoursite.com/protected/img.php?in=$1 [nc] Code:
<?php $in = $_GET['in']; $end = $_GET['end']; $sip = getenv("REMOTE_ADDR"); $fol = "log.dat"; $sc = file_get_contents($fol); if (preg_match ("/$sip/", $sc)) { header("Location: http://yourserver.com/protected/secret/$in.$end"); } else { header("Location: http://yourserver.com/protected/x.wmv"); } ?>
__________________
hatisblack at yahoo.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Dec 2004
Location: Vancouver
Posts: 4,325
|
Once again kick ass work Smokey!!!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Confirmed User
Industry Role:
Join Date: Feb 2003
Posts: 1,691
|
I need AHL installed on my server but they dont exist anymore.
![]() How does this compare to AHL? I really enjoyed the feature that would allow cheaters to hotlink my movies for a certain set time and after that time as passed it would redirect their traffic to wherever I wanted. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Confirmed User
Join Date: Dec 2004
Location: Vancouver
Posts: 4,325
|
Had to bump this thread since it's a good one! For those that want to use it for gallery submitting it may not be ideal since some TGP scripts will get sent to the hotlink video.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
. . .
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
|
nice, like to see programming that solves a problem simply and by thinking out of the box
![]()
__________________
__________________ Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs Check out the #1 WordPress SEO Plugin: CyberSEO Suite |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Confirmed User
Join Date: Aug 2008
Posts: 3,223
|
Great tutorials. Very helpful.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
Registered User
Industry Role:
Join Date: Mar 2002
Location: San Diego, CA
Posts: 935
|
You do realize that you can access the videos directly (bypassing the PHP scripts):
http://www.yoursite.com/protected/secret/video1.wmv etc. And you do realize that all the redirections will reveal the "secret" directory, right? It would take someone reasonably technical about 7 seconds to figure this all out, and then they would hot link directly to the "secret" videos and you'd continue on thinking you're "protected". (sigh) One suggestion - you could serve up the thumbs/videos through the PHP script, but that's got its own problems. You need to look into a token system that's built into Apache -- *not* PHP, which only protects HTML/PHP files, does not protect content. Note: this does not require any special software to do. (hint: mod_rewrite and cookies) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
ICQ: 197-556-237
Join Date: Jun 2003
Location: BRASIL !!!
Posts: 57,559
|
Hey Smokey, we <3 u
__________________
I'm just a newbie. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 | |
So Fucking Banned
Join Date: Aug 2008
Location: Just Blow Me
Posts: 10,551
|
Quote:
All I need to make a full mirror from every shitty site ![]() ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 |
ICQ:649699063
Industry Role:
Join Date: Mar 2003
Posts: 27,763
|
Thanks for nice tutorial...
__________________
Send me an email: [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 |
Confirmed User
Industry Role:
Join Date: Nov 2001
Location: NYC
Posts: 3,927
|
Smokey, do you know of a way to block these Russian bastards that are doing shit like this:
http://www.redlips.ru/cat/anal/2.htm normal htaccess shit doesn't work, has my host stumped as well...they're using java or some kind of frame. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 | |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
Quote:
this allows you to change the directory of the video without changin the hardcoded url. so if some clever joe like yourself tries to copy the final video url then i change the directory structure i then get to steal all your traffic , unless you want to change all your hardcoded urls all the time
__________________
hatisblack at yahoo.com |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 | |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
Quote:
__________________
hatisblack at yahoo.com |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 | |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
its always better to ask questions than just assume you know all the answers.
![]() Quote:
__________________
hatisblack at yahoo.com |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#26 |
I need a beer
![]() Industry Role:
Join Date: Jun 2002
Location: ♠ Toiletville ♠
Posts: 133,928
|
That Smokey is one smart cookie
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#27 |
I help you SUCCEED
Industry Role:
Join Date: Nov 2003
Location: The Pearl of the Orient Seas
Posts: 32,195
|
Resource post FTW. Good job, Smokey!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#28 | |
Registered User
Industry Role:
Join Date: Mar 2002
Location: San Diego, CA
Posts: 935
|
Quote:
My point is, security through obscurity is not really security. Better to design the thing right the first time and not have to touch it again. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#29 |
Registered User
Industry Role:
Join Date: Mar 2002
Location: San Diego, CA
Posts: 935
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#30 | |
Too lazy to set a custom title
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
|
Quote:
__________________
![]() ![]() ![]() It's all disambiguation ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#31 | |||
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
Quote:
Quote:
Quote:
the point was to think outside the box. you cant have it both ways. best for se, best for antihotlinking and the best for making money , go ahead show us the script on gfy for free and write a tutorial , i will say kudos to you. ![]() I would rather give someone the plate and have them choose their own food, rather than give them a plate of food and tell them what to eat ![]()
__________________
hatisblack at yahoo.com |
|||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#32 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
i would never presume i have all the answers, if you thought i implied it , then my bad.. i def don't know all the answers.
![]() simple fact is most hotlinkers arent doing it on an individual basis , they arent going to write some crazy script to spider my site for auto rotating directory changing if they did i would simply cron job rotate the directory paths every 5 mins then pick you off like a cherry when i see your script doing the same. The example was meant to be simple so people could modify at as they see fit, to either add additional security or not.. so sure yes some crazy script could allow someone to hotlink my videos if they use ip shifting crawlers that i somehow cant stop, right now most people use nothing, in my book something is one step ahead of nothing ![]() and something that costs nothing , saves you money and makes you money at the same time, has to be better than the alternative of NOTHING.
__________________
hatisblack at yahoo.com |
![]() |
![]() ![]() ![]() ![]() ![]() |