+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: *Hiding links* tutorial

  1. #1
    gptsven is offline x10 Lieutenant gptsven is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    253

    *Hiding links* tutorial

    Hello! my first code contribution for this website.

    Introduction
    I'm sure you all know those PTC sites where you click a link, need to wait for 30 seconds and get some money, right? well when you are viewing the ad you can not see the real url that actually get's loaded! I copied this idea for my own website using a sql database and some PHP!

    What does it do?
    Basically This script retrieves an url out of the sql database and places it into an I-frame, making the actual url invisible.

    Why is this usefull?
    - you hide the actual link.
    - you can add a little note above the iframe.
    - you can keep count of links hit on your website.
    - its just a cool and fun thing to have!

    The code
    PHP Code:
    <?php 
    include('functions.php');
    if (isset(
    $_GET['id']) && ctype_digit($_GET['id']))
    {
        
    DB_CONNECT();
        
    $id mysql_real_escape_string($_GET['id']);
        
    $query "SELECT * FROM websites WHERE id=$id LIMIT 1";
        
    $result mysql_query($query);
        
    $gpt_site mysql_fetch_assoc($result);
        
    $query2 "INSERT INTO linkout (parent_id,name,date,ip) VALUES ('$gpt_site[id]','$gpt_site[website_name]',now(),'$_SERVER[REMOTE_ADDR]')";
        
    mysql_query($query2) or die(mysql_error());
        
        
     
        
    ?>
        <html>
        <head>
        <style type="text/css">
        * { margin:0px;}
        </style>
        </head>
        <body style="margin:0px;">
        <div style="height:50px;width:100%;border-bottom:1px solid black;background: url('Images/linkout.png') repeat-x;">
        <img style="float:left;"src="Images/linkoutz.png" border="0" alt="Its appreciated if you signup as my referral!"/>
        <p style="float:right;margin-right:15px;margin-top:10px;font-size:15px;"><a href="<?php echo $gpt_site['website_link']?>">Close Frame</a></p>
        </div>
        <iframe id="Frame" style="margin-top:10px;" src="<?php echo $gpt_site['website_link']?>" border="0" framespacing="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" frameborder="0" height="100%" scrolling="Yes" width="100%"></iframe>
        </body>
        </html>
        <?php
        
    }
    easy!
    If you want to see a live example, you can check out my website and click on the gpt site links (intoffers)

    Hope this was helpfull.

  2. #2
    compwhizii is offline Banned compwhizii is an unknown quantity at this point
    Join Date
    May 2008
    Location
    The Moon
    Posts
    779

    Re: *Hiding links* tutorial

    Tutorials belong in, well you can take a guess ;)

    *Moved to tutorials*

  3. #3
    gptsven is offline x10 Lieutenant gptsven is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    253

    Re: *Hiding links* tutorial

    Quote Originally Posted by compwhizii View Post
    Tutorials belong in, well you can take a guess ;)

    *Moved to tutorials*
    Yeah But i was doubting if it was a better idea to post it under "programming"... :p

  4. #4
    compwhizii is offline Banned compwhizii is an unknown quantity at this point
    Join Date
    May 2008
    Location
    The Moon
    Posts
    779

    Re: *Hiding links* tutorial

    Sorry, are tutorials belong in tutorials

  5. #5
    vol7ron's Avatar
    vol7ron is offline x10 Lieutenant vol7ron is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    DC
    Posts
    434

    Re: *Hiding links* tutorial

    My site (found in my future sig when it's finally done) will expand on this idea, only I'll make it search engine friendly.
    Last edited by vol7ron; 12-11-2008 at 05:27 PM.
    If you find my post useful please add to my reputation by clicking the +Rep button
    You may also use the Donate link to donate credits - this is appreciated too Thanks to those whom have donated so far!


  6. #6
    Jordan C's Avatar
    Jordan C is offline x10 Lieutenant Jordan C is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    New Zealand
    Posts
    425

    Re: *Hiding links* tutorial

    Thanks for the helpful tutorial!


    Like Mac? Need Mac help? Thinking of switching? Smart Mac is the place for you!
    Join Smart Mac!


  7. #7
    cursedpsp is offline x10 Sophmore cursedpsp is an unknown quantity at this point
    Join Date
    Apr 2008
    Location
    Wiltshire, England
    Posts
    238

    Re: *Hiding links* tutorial

    I dont understand why we would need it?

    just do

    Code:
    <span style="display: none;"><a href="http://example.com">...
    if you want to hide links?

    And this isnt actually much of a tutorial? More of a snippet of code.

    Also: - there are many hitcounter gens on the web (like my site )
    Last edited by cursedpsp; 12-12-2008 at 08:57 AM.

  8. #8
    gptsven is offline x10 Lieutenant gptsven is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    253

    Re: *Hiding links* tutorial

    its... a tutorial cause im explaining you how to do something.
    the reasons why you could use it are explained above.

    i don't want to use a span. thats not the idea. and I dont want no pure HTML. I want it to be dynamic

  9. #9
    sunils's Avatar
    sunils is offline x10 Spammer sunils is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Chennai ,India
    Posts
    2,264

    Re: *Hiding links* tutorial

    Its a good tutorial. Thanks for the tutorial`
    [LEFT][B]Sunil Sankar
    -------------------------------------------------------------------------

  10. #10
    gptsven is offline x10 Lieutenant gptsven is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    253

    Re: *Hiding links* tutorial

    Quote Originally Posted by sunils View Post
    Its a good tutorial. Thanks for the tutorial`
    thanks

+ Reply to Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. A HTML + CSS Basic Tutorial
    By Zenax in forum Tutorials
    Replies: 14
    Last Post: 09-02-2011, 01:42 PM
  2. Post a Tutorial and Get Credits
    By Sohail in forum The Marketplace
    Replies: 2
    Last Post: 06-17-2008, 10:27 PM
  3. Cron Tutorial (Crontab Tutorial)
    By sunils in forum Tutorials
    Replies: 3
    Last Post: 06-14-2008, 10:34 PM
  4. Replies: 2
    Last Post: 12-16-2006, 08:59 PM
  5. Network Folder Sharing Tutorial
    By TheJeffsta in forum Computers & Technology
    Replies: 0
    Last Post: 03-31-2006, 02:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers