Return to iWEBTOOL

Go Back   iWEBTOOL Talk > The Web and your Website > Programming
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
Welcome to iWEBTOOL Talk, where you talk about webmaster-related stuff.
 
Discuss topics which interest you.
With over thousands of threads (topics), we're sure you'll find something that'll interest you.
Ask for help whenever you need it.
We have thousands of members who are available to help you if you need it.
It's absolutely FREE!

 1  Register           2  Browse the board           3  Discuss whatever may interest you!
 


Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 04-08-2007, 09:12 AM   #1
Marketprofits
Newcomer
 
Marketprofits's Avatar
 
Join Date: Apr 2007
Posts: 5
Marketprofits is on a distinguished road
Default Need help with script

Hello,

My forum is currently being submitted to traffic exchanges and autosurf scripts without my permission.

I know what sites it is, but how can I block those sites so that my forum does not appear on their rotators?

The only code I have is this and I dont know where it goes.

Can someone help?

Code:
<?php $d = $_SERVER['HTTP_REFERER']; if($d=="autosurf.com") { // block it } ?>

My forum is using vbulletin 3.6.5.
Marketprofits is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
SEO Checklist
Get yourself better ranking with
our "Do-it-Yourself" SEO Checklist.
Click Here
Old 04-08-2007, 11:14 AM   #2
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,459
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: Need help with script

Something like that, you would want to place at the top of your document, probably in your template file or your header template. Make sure that it shows on every page.

Do you know what code you are going to place instead lf "block it"?
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
Old 04-08-2007, 04:45 PM   #3
Marketprofits
Newcomer
 
Marketprofits's Avatar
 
Join Date: Apr 2007
Posts: 5
Marketprofits is on a distinguished road
Default Re: Need help with script

Thanks for replying. I do not know what code I should place nor do I know how it should be written out. vbulletin accepts coding different than what I have written here.

Can you help me out with the correct coding for vbulletin?

vbulletin accepts code using conditional in this manner <if condition= > </if>

Thanks
Marketprofits is offline  
Old 04-08-2007, 04:59 PM   #4
misterx
Junior Member
 
misterx's Avatar
 
Join Date: Mar 2007
Posts: 92
misterx is on a distinguished road
Default Re: Need help with script

Those conditions are for templates.
Find your index php file and try something like

Code:
<?php if($_SERVER['HTTP_REFERER']=="autosurf.com") { die(); } ?>

at the top of the script.
misterx is offline  
Old 04-08-2007, 05:03 PM   #5
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,459
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: Need help with script

No, unfortunately I don't know anything about vB code. I would think that standard PHP would work in this case though. If you can use PHP, I would suggest you redirect the visitor somewhere else using
Code:
header("Location: http:www.whereever.com"); exit;

You could redirect them back to where they came from, or simply take them to a page that you created for those visitors.

If you are using Apache Server, there is a way to redirect traffic using .htaccess too, but I don't know enough about that to advise you on.

Ultimate htaccess Article is a great place to get info on .htacess.
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
Old 04-08-2007, 05:15 PM   #6
misterx
Junior Member
 
misterx's Avatar
 
Join Date: Mar 2007
Posts: 92
misterx is on a distinguished road
Default Re: Need help with script

Yes, the best way would be to block it in .htaccess if it has only one IP.

Code:
deny from x.x.x.x

Where "x.x.x.x" is spider's IP.
misterx is offline  
Old 04-08-2007, 05:53 PM   #7
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,459
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: Need help with script

If you have apache, try this, replace "badreferrer" with the name of the website you want to block. This is the code that you want to put into your .htaccess file in the root directory of your site. If one doesn't exist, you can create one, it's just a simple text file.

Code:
RewriteEngine on Options +FollowSymlinks RewriteCond %{HTTP_REFERER} ^http://www.badreferrer.com [NC] RewriteRule .* - [F,L] RewriteCond %{HTTP_REFERER} ^http://badreferrer.com [NC] RewriteRule .* - [F,L]
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
Old 04-08-2007, 07:14 PM   #8
Marketprofits
Newcomer
 
Marketprofits's Avatar
 
Join Date: Apr 2007
Posts: 5
Marketprofits is on a distinguished road
Default

Quote:
Originally Posted by misterx View Post
Yes, the best way would be to block it in .htaccess if it has only one IP.

Code:
deny from x.x.x.x

Where "x.x.x.x" is spider's IP.

Well, they have several IPs.
If I block all of their IPs, will that site still be able to display my site on their rotator?

Quote:
Originally Posted by jumpenjuhosaphat View Post
If you have apache, try this, replace "badreferrer" with the name of the website you want to block. This is the code that you want to put into your .htaccess file in the root directory of your site. If one doesn't exist, you can create one, it's just a simple text file.

Code:
RewriteEngine on Options +FollowSymlinks RewriteCond %{HTTP_REFERER} ^http://www.badreferrer.com [NC] RewriteRule .* - [F,L] RewriteCond %{HTTP_REFERER} ^http://badreferrer.com [NC] RewriteRule .* - [F,L]

I tried this, but it has not worked. This is how I wrote the rewrite code, check it out:

Code:
# Options +FollowSymlinks RewriteCond %{HTTP_REFERER} http://www\.5centminimum\.com [NC,OR] RewriteCond %{HTTP_REFERER} http://www\.a1mails\.co\.uk\.com RewriteCond %{HTTP_REFERER} http://www\.onemillionhits\.classics-hits\.com RewriteRule .* - [F]

Is this right?

This is another code I am working with:
Quote:
if (preg_match('/autosurf\.com/', $_SERVER['HTTP_REFERER']))
{
exit();
}

Guys, I got it. Thanks a bunch. I tested it on that site and now my forum does not appear on it. This is what I was after.
Thanks a bunch.

I put the codes in my index.php file.


Thank you everyone.

Regular php functions with vbulletin as vbulletin is php as well. ty

Last edited 04-08-2007 at 08:49 PM.
Marketprofits is offline  
Old 04-08-2007, 08:26 PM   #9
misterx
Junior Member
 
misterx's Avatar
 
Join Date: Mar 2007
Posts: 92
misterx is on a distinguished road
Default Re: Need help with script

Which solution did you use?
misterx is offline  
Old 04-08-2007, 08:38 PM   #10
Marketprofits
Newcomer
 
Marketprofits's Avatar
 
Join Date: Apr 2007
Posts: 5
Marketprofits is on a distinguished road
Default Re: Need help with script

Quote:
Originally Posted by misterx View Post
Which solution did you use?

I actually have both of these codes in my forum's index.php file and my blog portal index.php file.

Code:
if($_SERVER['HTTP_REFERER']=="badsite.com") { die(); } if (preg_match('/badsite\.com/', $_SERVER['HTTP_REFERER'])) { exit(); }


I didn't check to see which one would work best as I just wanted to end my situation immediately.

When I have some free time left, I will update accordingly.

Thanks.
Marketprofits is offline  
Old 04-08-2007, 08:50 PM   #11
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,459
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: Need help with script

I'm glad it worked out for you. Congrats.
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
Old 04-09-2007, 01:30 AM   #12
Katey
Senior Member
 
Katey's Avatar
 
Join Date: Apr 2006
Location: Hull, United Kingdom.
Posts: 317
Katey has much to be proud ofKatey has much to be proud ofKatey has much to be proud ofKatey has much to be proud ofKatey has much to be proud ofKatey has much to be proud ofKatey has much to be proud ofKatey has much to be proud of
Default Re: Need help with script

Hi there,

I don't see the point in these click rotators, they don't give the user any advantage what so ever. I mean all it does is waste bandwidth and give the website more hits, unique visitors are the important factor.

It must be one of the most pointless things of the Internet after spam.


Regards,
Kieran Taylor.
Katey is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
Webmaster Tools Webmaster Tools Click Here
Closed Thread

(Threads which have no activity for more than 30 days are automatically closed.)



Quick Reply
Message:

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
need a script astrovineet Content 3 12-28-2006 12:12 PM
look at this new script Stevo Your directory 0 10-24-2006 10:48 PM
C++ Script ken Programming 1 10-07-2006 04:35 PM
100% UNIQUE and CUSTOM arcade script. Start your own arcade script business! Skribblez Websites for Sale 4 06-16-2006 05:54 PM
Is there such a script...? redQueen Programming 3 01-10-2006 05:42 PM


All times are GMT. The time now is 02:52 PM.


Powered by vBulletin v3.6.7 © 2008, Jelsoft Enterprises Ltd. SEO by vBSEO © 2006, Crawlability, Inc.