Results 1 to 9 of 9

Thread: /scripts/outphp?LinkID=23

  1. #1
    mastermind michael_gersitz's Avatar
    Join Date
    Aug 2003
    Location
    Buffalo
    Posts
    749

    /scripts/outphp?LinkID=23

    I have noticed on websitepublisher and other sites using URLS like this.... I need one like this that will allow me to track how much traffic I sent to other sites...

    I was wondering if There was a script you downloaded or can you give me hint how you made this script.


    THank You in Advance!

  2. #2
    mastermind michael_gersitz's Avatar
    Join Date
    Aug 2003
    Location
    Buffalo
    Posts
    749
    Example page - http://www.websitepublisher.net/arti...rging_content/

    "Link

    Two popular turnkey credit card processors:
    2Checkout
    Revecom "

  3. #3
    Registered GCT13's Avatar
    Join Date
    Aug 2003
    Location
    NYC
    Posts
    480
    My out.php script uses two databases and a .php file.

    Create two databases:
    urls (id,url)
    LinkTracker (id,lid)

    Db "urls" will list all your external links.

    Db "LinkTracker" will be updated whenever someone clicks an external link. So if Google's entry in "urls" is:

    id url
    9 http://www.google.com

    "LinkTracker" will be inserted with:

    id lid
    1000 9

    Where lid is the link's id in "urls"

    "LinkTracker" will grow and you'll be able to see how many times users leave your site and what link they click. You could even add the current data to LinkTracker to plot clicks over time.


    Now to the out.php file. For example:

    out.php?LinkId=9

    will forward to http://www.google.com


    PHP Code:
    if(isset($_GET['LinkID'])){

        
    // the querystring is set, then execute the script
        
    $LinkID = (int) $_GET['LinkID'];
        
        
    dbConnect(); // this is the function call to connect to your database
        
    $query "insert LinkTracker set lid = $LinkID"
        @
    mysql_query($query); 

        
    $query "select url from urls where id = $LinkID";
        
    $result sql_query($query); 

        
    $rd $result[0][0];
        
    header("Location: $rd");

    }else{ 
    // no querystring, send back to WebSitePublisher.net

        
    header("Location: http://www.websitepublisher.net");


    ....

  4. #4
    Registered Mike's Avatar
    Join Date
    May 2003
    Location
    UK
    Posts
    2,755
    If you want to use the script I use michael, PM me.
    Don't you just love free internet games ?

  5. #5
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    Thanks for this, I'll use it tonight when making my new sites

  6. #6
    Wouldn't it be easier (and more efficient) to just use one table?

    tbl_urls (id, url, count)

  7. #7
    Registered GCT13's Avatar
    Join Date
    Aug 2003
    Location
    NYC
    Posts
    480
    Originally posted by chrispian
    Wouldn't it be easier (and more efficient) to just use one table?
    Easier perhaps short term, but not more efficient since the DB technically wouldn't be normalized.

    For those of you using AXS Visitor Tracking, there is a feature that allows you to track clicks.

    Say your AXS file are located here: /cgi-bin/axs/

    Then tag all your outgoing links like so:

    http://www.yoursite.com/cgi-bin/axs/ax.pl?http://www.somewhereelse.com

    And voila. All outgoing clicks show up in your log reports. I've started tracking clicks way.

    More info on AXS can be found here.
    ....

  8. #8
    Since we aren't trying to relate anything, it sems to me normal order doesn't apply. It would be different if we were trying to do a join on, say, id, with details about the url or something. I suppose anything that "changes" should be in it's own table according to first normal order, but this is a bit of an extreme case

    You are right, of course, it's more correct to do it your way.

  9. #9
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    Can't get the script to work.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •