Bandwidth thieft / Grabber scripts prevention methods?

Started on the old forum in August 2010 · view the original in the archive · old links redirect here

6 replies · 1,209 views · started 16 years ago · 1 min read

4 participants
something else Fellow · 2,296 posts #1

Seeming grabber scripts are becoming more and more alive on here i was wondering what your best methods of protection are?

maybe:

if(substr_count($_SERVER['HTTP_USER_AGENT'],"php")>0){
header("Location: http://getlost.con");
    exit;
}

or maybe using a logged in script with headers to hide file locations such as:

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Type: $type");
header("Content-Disposition: attachment; filename=\"$name\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . $size);

You could use .htaccess to prevent images being stolen such as:

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://mysite.com/hotlink.png [L]

But For Many Mobile Phones They Do Not Support Referer so you need to add a blank No Condition also

any better ideas?

subzero Super moderator Fellow · 3,954 posts #2

Use anti hotlink in download...

check if isdomain isnowdomain

i liked this look of this script and mite share it

I will share mine soon

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Attachments: rubberwall10.zip
something else Fellow · 2,296 posts #3

i use something simular that iv coded myself but you have to login to be able to access the download page rather than rely on HTTP_REFERER as a lot of mobiles dont support it. So you have to also have a blank domain = "" for referer also which can also cause problems

iv also had a lot of problems with some Nokia n-series phones not being able to download files when using header("Content-Disposition: attachment; filename="$name"");

softwarefreak Senior · 349 posts #4

😀

I've got a cool IDEA, 😀

if the site owners makes dynamic css files, None of replacement techniques will work properly 😛

No preg_match, No str_replace 😛

Just basic demo

<div class="foo">some content</div>

when page is refreshed

<div class="bar">some content</div>

I need some facebook likes, can you please help me 🤝 http://facebook.com/softwarefreakin I noticed social media is really powerful 🧙 Well DONE is better than well SAID

soul_reaper Developer · 83 posts #5

softwarefreak wrote: I've got a cool IDEA, 😀

if the site owners makes dynamic css files, None of replacement techniques will work properly 😛

No preg_match, No str_replace 😛

Just basic demo

<div class="foo">some content</div>

when page is refreshed

<div class="bar">some content</div>

if you use preg_replace can be avoided :-?

<?php
$div = preg_replace('|<div class="(.*?)">|is' ,'your div' ,$div);
?>

The LORD is my shepherd, i shall not be in want. He makes me lie down in green pastures, he leads me beside quiet waters, he restore my soul. He guides me in path of righteousness for his name's sake. Even though i walk through the valley of shadow of death, i will fear no evil for you are with me.

softwarefreak Senior · 349 posts #6

😀 dat was just a basic example, It's not dat easy to grab a page perfectly where the css classes/ids are dynamic 😀

I need some facebook likes, can you please help me 🤝 http://facebook.com/softwarefreakin I noticed social media is really powerful 🧙 Well DONE is better than well SAID

soul_reaper Developer · 83 posts #7

softwarefreak wrote: :D dat was just a basic example, It's not dat easy to grab a page perfectly where the css classes/ids are dynamic :D

you're right 😀

The LORD is my shepherd, i shall not be in want. He makes me lie down in green pastures, he leads me beside quiet waters, he restore my soul. He guides me in path of righteousness for his name's sake. Even though i walk through the valley of shadow of death, i will fear no evil for you are with me.

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close