![]() |
I've hacked my attachment.php script to prevent users from posting an attachment on my board, and then using the HTML to display it somewhere else. This prevents people from posting a pic on your board, then using your bandwidth to place that pic elsewhere. It is a tiny code change.
I've substituted my own logo, (LOL), but you can replace that with anything, or just use the "exit;" line to eliminate the pic entirely. In attachment.php, right after: PHP Code:
PHP Code:
NOTE: Changed to use the full path in "$filename = ..." to get this to work on some servers. ANOTHER: See this post in this thread for a modification that works on Win32 servers: https://vborg.vbsupport.ru/showthrea...895#post297895 AGAIN: If you modify avatar.php similarly, you can prevent people from cross-linking your avatars: https://vborg.vbsupport.ru/showthrea...893#post303893 UPDATE: The parse_url line is slightly different to use the new PHP syntax. |
Excellent hack, most useful! Keep up the good work/hacks
|
so, just making sure, this hack will, if someone goes to say http://www.stealsomeonesbandwidthbyp...heirserver.com and links to a pic on http://www.yoursite.com it will replace the pic with one of your choice such as "image hosted by coderforums.net"?
|
Yep. That's it exactly.
|
Can you add more than one domain? For example do I need to add forum.racesimcentral.com AND www.racesimcentral.com, or just put racesimcentral.com?
if (! strstr($checkurl, "racesimcentral.com")) { Right? |
Never mind I checked and found racesimcentral.com is enough. :)
|
You can substitute "yourdomain" for just a part of your domain name. If you have ".com" and ".net" mapped to the same forum, then you could use just the base portion of you domain name. For example: yourdomain.com and yourdomain.net would be protected by just putting yourdomain in the check line.
|
wow thanks :)
|
mm this is a great hack! I am going to install now and shall tell you how it works out :)
|
works great as far as I can tell!
Just testing :) http://www.coderforums.net/attachment.php?postid=252 |
it does not work for me in 2.21. I am able to view attachment from dreamweaver and from anywhere
|
Try to view the attchment from a site that is not related to yours... look at nafae's post, above...
|
Testing
https://vborg.vbsupport.ru/ |
Quote:
|
Hey! Post your own variations here! We'd all like to see.
|
I rather not :) Rated R label... teach those pesky bandwidth stealers a lesson. ;)
I was thinking of using my avatar and use the text "You want your ear bit off too??" |
Quote:
|
This is an awesome, money-saving hack! Thank you very much! I'm going to give it a shot right here...my new image is a giant orange logo with my URL... :D
http://forums.gtplanet.net/attachmen...&postid=125055 |
|
|
again
|
If you post or send me the code snippet that you added, I'll try to help you figure out what is wrong.
|
This substitutes my logo, as it should, with my browser:
http://adultadventurers.com/vbulleti...?postid=133823 |
I replaced the http with full filepath and it is working.
thanks.testing |
How do you use this nice hack if you have four different domain names :D
and is it posible to add your IP to the domains list :D Thanks |
you can modify this, and just
PHP Code:
|
Quote:
PHP Code:
|
Thank you very much Guru, is that the right way to add a third domain, Please correct me.
if ((false === strpos($checkurl, "firstdomain") || (false === strpos($checkurl, "seconddomain") || (false === strpos($checkurl, "thirddomain")) { Sorry I don't know PHP :o |
Quote:
|
|
how would i add this to work with my avatars?
|
Avatars are attachments, as far as I know...
|
Quote:
|
|
Nice hack, here is a test of what shows on mine, just for anyone that wishes to view it.
http://www.bbaddons.com/forums/attac...p?s=&postid=37 SaintDog |
Nice hack! Please correct me if I'm wrong though, if you have set that only registered users can view attachments on your board, then most people would get the login screen anyway, right?
|
Quote:
|
Nobody wants to steal the bandwidth to serve an ad for my site...
|
Quote:
|
Quote:
BTW Mods, quoting a post with a quote seems not to work? |
All times are GMT. The time now is 02:18 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|