CompleteGFX Home Contact Site Map

Go Back   Web Proxy Forum > Webmasters Talk, Design, and Development > Web Design and Programming

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-16-2009, 08:16 PM
proxies2u's Avatar
Proxified Master
 
Join Date: Nov 2008
Location: The Netherlands
Posts: 679
Rep: 5
WPT Credits: 764.42
Downloads: 5
Uploads: 1
proxies2u is an unknown quantity at this point
Thumbs up A better click counter for the proxy List script

Hi,

just wrote some tutorial for a safer click counter on proxy list script sites:

the code you should use for your "count_hits.php" file is:

PHP Code:
if (empty($_GET['url'])) {
    
$url 'http://www.yoursite.com/';
} else {
    if (
get_magic_quotes_gpc()) $_GET['url'] = stripslashes($_GET['url']);
    
$gURL mysql_real_escape_string($_GET['url']);
    
$result mysql_query("SELECT ident FROM links WHERE ident = '".$gURL."'");
    if (
mysql_num_rows($result) == 1) {
        
$id mysql_result($result0'ident');
        
$IP mysql_real_escape_string($_SERVER['REMOTE_ADDR']);
        
$time_diff 3600*24*14// count ones in 14 days
        
$sql sprintf("SELECT COUNT(*) AS testval FROM clicks WHERE ip_adr = '%s' AND click_time+%d > NOW() AND site_id = %d"$IP$time_diff$id);
        
$res mysql_query($sql) or die(mysql_error());
        
$test mysql_result($res0'testval');
        if (
$tell == 0) {
            
mysql_query(sprintf("INSERT INTO clicks SET ip_adr = '%s', site_id = %d"$IP$gURL));
        }
    } else {
        
$url 'http://www.yoursite.com/';
    }
}
header('Location: '.$url);
exit; 
Check the original URL for database preparations and further information:
Count clicks the right way! | Web Development Blog

I hope this will help, don't forget empty your clicks database table once in a few month!
__________________
Submit your Proxies
Reply With Quote
  #2 (permalink)  
Old 02-16-2009, 08:44 PM
WebEvader.org's Avatar
Proxified Master
 
Join Date: Dec 2008
Location: On your screen
Posts: 111
Rep: 0
WPT Credits: -21.74
Downloads: 2
Uploads: 0
WebEvader.org
Default

Thanks for this, very useful code
Reply With Quote
  #3 (permalink)  
Old 02-16-2009, 08:48 PM
proxies2u's Avatar
Proxified Master
 
Join Date: Nov 2008
Location: The Netherlands
Posts: 679
Rep: 5
WPT Credits: 764.42
Downloads: 5
Uploads: 1
proxies2u is an unknown quantity at this point
Default

Quote:
Originally Posted by WebEvader.org View Post
Thanks for this, very useful code
You're welcome after visiting your site I remembered that the code from my own list is very easy to integrate in many listing sites.
__________________
Submit your Proxies
Reply With Quote
  #4 (permalink)  
Old 02-17-2009, 03:38 AM
Proxy Warrior
 
Join Date: Jan 2009
Posts: 91
Rep: 11
WPT Credits: 177.23
Downloads: 0
Uploads: 0
fear1 is on a distinguished road
Default

It was very nice and useful but my proxy list had this from the first day.
__________________
Proxy Blog - Free Proxy Templates
Reply With Quote
  #5 (permalink)  
Old 02-17-2009, 05:48 AM
proxies2u's Avatar
Proxified Master
 
Join Date: Nov 2008
Location: The Netherlands
Posts: 679
Rep: 5
WPT Credits: 764.42
Downloads: 5
Uploads: 1
proxies2u is an unknown quantity at this point
Default

Quote:
Originally Posted by fear1 View Post
It was very nice and useful but my proxy list had this from the first day.
You don't! Check also the comment on my blog site
__________________
Submit your Proxies

Last edited by proxies2u; 02-17-2009 at 06:01 AM.
Reply With Quote
  #6 (permalink)  
Old 02-17-2009, 06:34 PM
Aquarezz's Avatar
Proxified Master
 
Join Date: Dec 2008
Posts: 159
Rep: 0
WPT Credits: 371.09
Downloads: 0
Uploads: 0
Aquarezz
Default

Great!
I made a post about it on my proxy blog!
Check it out here: ProxLists.Com Weblog :: Tips :: A better click counter for the proxy List script

Greetz and thanks
__________________
Submit your proxies to ProxB.Com |Guaranteed Traffic!
Reply With Quote
  #7 (permalink)  
Old 03-01-2009, 01:22 PM
Aquarezz's Avatar
Proxified Master
 
Join Date: Dec 2008
Posts: 159
Rep: 0
WPT Credits: 371.09
Downloads: 0
Uploads: 0
Aquarezz
Default

I don't understand, in this script (count_hits.php) where to add your code?


<?php

include "config.php";

$url=$_GET['url'];

$link = mysql_connect($db_host,$db_user,$db_pass);

mysql_select_db($db_name);

$query = "SELECT * FROM submission WHERE url='$url';";

$result = mysql_query($query) or die("d");

$line = mysql_fetch_row($result);

if ($line[5]==""){$line[5]=0;}

$count=$line[5]+1;

$query="UPDATE `submission` SET `url` = '$line[0]',`category` = '$line[1]',`email` = '$line[2]', `status` = '$line[3]', `time` = '$line[4]', `hits` = '$count' WHERE `url` = '$url' LIMIT 1 ;";

$result = mysql_query($query) or die("<font color=red>QUERY FALLED</font><br>");

mysql_close($link);

Header("Location: $url");

?>
__________________
Submit your proxies to ProxB.Com |Guaranteed Traffic!
Reply With Quote
  #8 (permalink)  
Old 03-01-2009, 02:28 PM
proxies2u's Avatar
Proxified Master
 
Join Date: Nov 2008
Location: The Netherlands
Posts: 679
Rep: 5
WPT Credits: 764.42
Downloads: 5
Uploads: 1
proxies2u is an unknown quantity at this point
Default

you need to replace the code, the original code is really BAD
__________________
Submit your Proxies
Reply With Quote
  #9 (permalink)  
Old 03-01-2009, 06:17 PM
Proxified Master
 
Join Date: Sep 2008
Location: holland
Posts: 102
Rep: 0
WPT Credits: 114.17
Downloads: 0
Uploads: 0
mori
Default

tanks this is what i needed. If you have some more nice fixes or new options for this script pm. Mayby i can share my code too... see Unblock blocked sites with web proxies

I have date see:
http://unblocked.me/recent.php

and i have special sections youtube myspace etc...Very good for seo!

Last edited by mori; 03-01-2009 at 06:27 PM.
Reply With Quote
  #10 (permalink)  
Old 03-01-2009, 06:48 PM
proxies2u's Avatar
Proxified Master
 
Join Date: Nov 2008
Location: The Netherlands
Posts: 679
Rep: 5
WPT Credits: 764.42
Downloads: 5
Uploads: 1
proxies2u is an unknown quantity at this point
Default

Mori,

you have a great list but the script is really bad written and is missing important features.

compare your listings with them on proxyroll.com
__________________
Submit your Proxies
Reply With Quote
Reply
Thread Tools
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


All times are GMT. The time now is 12:28 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios