NetBuilders

Members in Chat:

You are welcome to look around. You will have to register before you can post a message, create a blog, chat live with our members, or add a site to our directory.



Reply Singapore Web Design
Old 20 June, 2009, 14:44 PM   #1 (permalink)
Newbie Net Builder
 
xrvel's Avatar
 
Location: ProxyCoder.com
Blog Entries: 1
Thanked 19 Times in 8 Posts
Posts: 37
$NetBucks: 123
Join Date: Mar 2009
Last Online: 8 January, 2010 15:46 PM
Lightbulb Code To Ban Domain (for Proxy List Owners)

You can try this. I made it pretty human readable and human friendly
If you own a proxy list, you can ban some domain, blogspot.com, *.co.cc, *.cn, *.something, etc
PHP Code:
<?php
/*
 * Author : xrvel (xrvel.com)
 */
// MAIN CODE START
function isBanned($url) {

    
// Enter banned URL here
    
$ban_reg_exp = array(
        
'blogspot.com',
        
'.cn',
        
'.co.cc',
        
'some-thing.com'
    
);

    
$ban_reg_exp '/('.friendlyRegExp(implode('|'$ban_reg_exp)).')+$/i';
    
//echo $ban_reg_exp;

    
$url urldecode($url);
    
$url preg_replace('/^http(s)?\:\/\/www\./i''http\\1://'$url);// remove "www."
    
$parsed_url parse_url($url);
    
//echo '<pre>', print_r($parsed_url, true), '</pre>';
    
$host $parsed_url['host'];
    return (bool)
preg_match($ban_reg_exp$host);
}

function 
friendlyRegExp($s) {
    
$s trim($s);
    
$s str_replace('.''\.'$s);
    
$s str_replace('-''\-'$s);
    return 
$s;
}
// MAIN CODE END

//
// Let's test our code with some URLs
//
$url 'https://www.test1.com//test.com?awioduawd';
echo 
$url' ::: ';
if (
isBanned($url)) {
    echo 
'IS BANNED';
} else {
    echo 
'is allowed...';
}

echo 
'<br />';

$url 'https://www.test1.cn/test.com?axasa';
echo 
$url' ::: ';
if (
isBanned($url)) {
    echo 
'IS BANNED';
} else {
    echo 
'is allowed...';
}

echo 
'<br />';

$url 'https://www.test1-something%2Ecn/test.com?axasa';
echo 
$url' ::: ';
if (
isBanned($url)) {
    echo 
'IS BANNED';
} else {
    echo 
'is allowed...';
}

echo 
'<br />';

$url 'https://www.test1-something.blogspot.com/test.com?axasa';
echo 
$url' ::: ';
if (
isBanned($url)) {
    echo 
'IS BANNED';
} else {
    echo 
'is allowed...';
}

echo 
'<br />';

$url 'https://www.hello.cn.more.com/test.com?axasa';
echo 
$url' ::: ';
if (
isBanned($url)) {
    echo 
'IS BANNED';
} else {
    echo 
'is allowed...';
}

echo 
'<br />';

$url 'http://test1.cn/test.com?axasa';
echo 
$url' ::: ';
if (
isBanned($url)) {
    echo 
'IS BANNED';
} else {
    echo 
'is allowed...';
}

echo 
'<br />';
?>
The output of above example is :
Code:
https://www.test1.com//test.com?awioduawd ::: is allowed...
https://www.test1.cn/test.com?axasa ::: IS BANNED
https://www.test1-something%2Ecn/test.com?axasa ::: IS BANNED
https://www.test1-something.blogspot.com/test.com?axasa ::: IS BANNED
https://www.hello.cn.more.com/test.com?axasa ::: is allowed...
http://test1.cn/test.com?axasa ::: IS BANNED
__________________
. Xrvel . Free Proxy List Script (BETA) .
Anyone want to join open source proxy list project? Let's work with subversion. PM me for details.
Domains for sale : ihidden.com

Last edited by xrvel; 20 June, 2009 at 15:31 PM..
  Reply With Quote
Thanked by:
m42 (20 June, 2009), WebEvader (20 June, 2009), Will.Spencer (20 June, 2009)
Old 20 June, 2009, 15:16 PM   #2 (permalink)
-
 
geeknb's Avatar
 
Thanked 16 Times in 16 Posts
Posts: 292
$NetBucks: 81
Join Date: Jan 2009
Last Online: Today 04:45 AM
Default

Wow! Thank you very much!
I'll add this to my proxy listing site.
  Reply With Quote
Old 20 June, 2009, 15:28 PM   #3 (permalink)
Newbie Net Builder
 
xrvel's Avatar
 
Location: ProxyCoder.com
Blog Entries: 1
Thanked 19 Times in 8 Posts
Posts: 37
$NetBucks: 123
Join Date: Mar 2009
Last Online: 8 January, 2010 15:46 PM
Default

Quote:
Originally Posted by geeknb View Post
Wow! Thank you very much!
I'll add this to my proxy listing site.
You're welcome. Let's clean our list from .co.cc
__________________
. Xrvel . Free Proxy List Script (BETA) .
Anyone want to join open source proxy list project? Let's work with subversion. PM me for details.
Domains for sale : ihidden.com
  Reply With Quote
Old 20 June, 2009, 20:46 PM   #4 (permalink)
Moderator
 
WebEvader's Avatar
 
Location: UK
Blog Entries: 2
Thanked 25 Times in 20 Posts
Posts: 352
Recent Blog: Hey
$NetBucks: 105
Join Date: Jan 2009
Last Online: Yesterday 22:03 PM
Send a message via AIM to WebEvader Send a message via MSN to WebEvader Send a message via Yahoo to WebEvader
Default

Thanks Xrvel I am definitely going to use this on my list...
__________________
CEEGHost.com - Web Hosting at a fraction of the price!
24/7/365 Support - No Setup Fee - Instant Activation

█ Get 80% off your first order with "BIG80" and 25% off for life with "25LIFE" !!!
Follow us: @CEEGHost | Free Proxy Sites - WebEvader.org
  Reply With Quote
Old 9 July, 2009, 12:45 PM   #5 (permalink)
Newbie Net Builder
 
Location: NET<>DP
Thanked 5 Times in 4 Posts
Posts: 120
$NetBucks: 260
Join Date: Jul 2009
Last Online: 26 July, 2010 01:00 AM
Default

what domain should you block then?
  Reply With Quote
Reply

Bookmarks

Tags
ban, code, domain, list, owners, proxy, xrvel

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Guides for New Proxy Owners Will.Spencer Web Proxies 17 1 November, 2009 07:31 AM
Submit Your "Proxy Site, List, Proxy Forum, Directory, Proxy Blogs" FREE! Jorge05r Proxy List Announcements 11 6 July, 2009 19:08 PM
critical news for all proxy list owners using proxylistscript.com script ankit Web Proxies 17 8 June, 2009 19:00 PM
Godaddy Promo Code List bluearrow Domaining 2 14 May, 2009 08:31 AM
Beware Proxy Owners! Aquarezz Web Proxies 15 24 February, 2009 15:47 PM


All times are GMT. The time now is 08:48 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios