NetBuilders

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.



Advertise With Us

Reply Click here - or the world will end. Seriously!
Old 20 June, 2009, 14:44 PM   #1 (permalink)
Newbie Net Builder
 
xrvel's Avatar
 
Location: ProxyCoder.com
iTrader: (0)
Blog Entries: 1
Thanked 18 Times in 8 Posts
Posts: 37
$NetBucks: 65
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
 
iTrader: (6)
Thanked 11 Times in 11 Posts
Posts: 235
Recent Blog: Sherlock Holmes
$NetBucks: 200
Join Date: Jan 2009
Last Online: 12 March, 2010 14:38 PM
Default

Wow! Thank you very much!
I'll add this to my proxy listing site.
__________________
▼ Submit Your Proxies Here (Auto Approval!)
*Windows 7 Video Reviews*
Must Watch Movies
  Reply With Quote
Old 20 June, 2009, 15:28 PM   #3 (permalink)
Newbie Net Builder
 
xrvel's Avatar
 
Location: ProxyCoder.com
iTrader: (0)
Blog Entries: 1
Thanked 18 Times in 8 Posts
Posts: 37
$NetBucks: 65
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
iTrader: (8)
Blog Entries: 2
Thanked 19 Times in 15 Posts
Posts: 307
$NetBucks: 214
Join Date: Jan 2009
Last Online: Yesterday 22:07 PM
Default

Thanks Xrvel I am definitely going to use this on my list...
__________________
Submit Your Proxies @ WebEvader.org Free Proxy Sites
  Reply With Quote
Old 9 July, 2009, 12:45 PM   #5 (permalink)
Newbie Net Builder
 
Location: NET<>DP
iTrader: (0)
Thanked 5 Times in 4 Posts
Posts: 86
$NetBucks: 133
Join Date: Jul 2009
Last Online: 3 March, 2010 05:13 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 00:42 AM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.1
vBAdvertise v1.0.0 Copyright ©2009, PixelFX Studios
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios