I'm looking for a tutorial or a script like the one on Gorillamask.net From it's looks its a javascript+php script. Maybe I'm wrong I see it going to log.php with a javascript (adsolution-tag) which I searched for and didn't find shit on it except for a bunch of websites that use it.

I hate all the referrer scripts that have graphs, etc. I just want something easy like that. It shows whose linking to you, and its a good way to advertise for them. It's all automatic, no need for them to 'add themselves' or anything stupid like that. I figure it's a good way to bring in a lot of traffic.

So if anyone knows anything about that, I'd appreciate it. I don't mind trying to make the script myself, although I suck at that. I've read tutorials before but none of them seem to talk about what I need, or else I just miss it.

    make :

    <?
    
    // get referrer
    $ref = $_SERVER['HTTP_REFERER'];
    
    $SQL = mysql_query(" SELECT * FROM my_table WHERE ref='".$ref."' ") or die (mysql_error());
    
    $info = mysql_fetch_array($SQL);
    
    if(! $info[ref] ){
    
    $SQL = mysql_query(" insert into my_table set ref='".$ref."' ");
    }
    
    ?>
    

    try

      wait what am I doing with this? I don't see any output for it.

      And I don't see anything for it to connect to the database anyways?

      Man I'm so confused.

        ok , no problems

        
        // this code create table ..
        
        CREATE TABLE `snake_php` (
        `id` int(11) NOT NULL auto_increment,
        `ref` varchar(100) NOT NULL default '',
        PRIMARY KEY (`id`)
        ) TYPE=MyISAM;
        
        

        connect to the database .. save (config.php)

        <?
        
        $date = "database_name";
        $pass = "";
        $user = "root";
        $server = "localhost";
        
        $link = mysql_connect($server,$usre,$pass) or die (mysql_error());
        mysql_select_db($data);
        
        ?>
        

        now save this code in save_ref.php , and include this file ( save_ref.php) in you home page ( index.php ) ..

        <? 
        
        include(" config.php ");
        
        // get referrer 
        $ref = $_SERVER['HTTP_REFERER']; 
        
        $SQL = mysql_query(" SELECT * FROM snake_php WHERE ref='".$ref."' ") or die (mysql_error()); 
        
        $info = mysql_fetch_array($SQL); 
        
        if(! $info[ref] ){ 
        
        $SQL = mysql_query(" insert into snake_php set ref='".$ref."' "); 
        } 
        
        ?> 
        

        when you need to view All referrer show this

        http://www.XXX.com/show.php

        save this code in show.php

        <?
        
        include(" config.php");
        
        $SQL = mysql_query(" select * from snake_php order by id desc ") or die (mysql_error());
        
        ECHO " This Is All Refrerer To you Site : ";
        
        while($row = mysql_fetch_array($SQL))
        {
        ECHO "- <a href='$row[ref]'>".$row[ref]."</a><br>";
        }
        
        ?>
        

        welcome

          Sweet thanks, but how does one make it into like a ranking system like more 'in hits' or whatever would be number 1 (on top) then 2nd most would be 2nd link, etc...? I appreciate you going through this with me, I like learning coding its just I'm not a natural coder. Lolz, pretty obvious.

            Like how many hits they have brought in. And higher amount of hits in would be one of the first links like this say;

            url ins
            Google.com/asdfsadf=crapstuff 44
            crapdumb.com/php?go=asswhore 41
            etc
            etc
            etc

              ah, ok update to this ..

              <?
               // this code create table .. 
              
              CREATE TABLE `snake_php` ( 
              `id` int(11) NOT NULL auto_increment, 
              `count` int(11) NOT NULL auto_increment,
              `ref` varchar(100) NOT NULL default '', 
              PRIMARY KEY (`id`) 
              ) TYPE=MyISAM;
              ?>
              
              <?  
              
              include(" config.php "); 
              
              // get referrer 
              $ref = $_SERVER['HTTP_REFERER'];  
              
              $SQL = mysql_query(" SELECT * FROM snake_php WHERE ref='".$ref."' ") or die (mysql_error());  
              
              $info = mysql_fetch_array($SQL);  
              
              if(! $info[ref] ){  
              
              // new lines ( update) 
              
              $SQL = mysql_query(" insert into snake_php set ref='".$ref."',count='1' ");  
              
              
              }else{
              
              $SQL = mysql_query(" update snake_php set ref='".$ref."', count=count +1 ");  
              } ?>
              <? 
              
              include(" config.php"); 
              
              $SQL = mysql_query(" select * from snake_php order by id desc ") or die (mysql_error()); 
              
              ECHO " This Is All Refrerer To you Site : "; 
              
              while($row = mysql_fetch_array($SQL)) 
              { 
              ECHO "- <a href='$row[ref]'>".$row[ref]."</a> ( $row[count] ) <br>"; 
              } 
              
              ?> 
              
              

                Sweet thanks man. I appreciate all your help, now I think I understand this whole http_referrer thing.

                  Write a Reply...