+ Reply to Thread
Results 1 to 3 of 3
  1. Join Date
    Aug 2008
    Posts
    36
    Thanks
    2
    Thanked 1 Time in 1 Post

    Hiding Affiliate Link URL's?

    Hi All

    I've posted this same message in the following thread from earlier in the year, but is at the back of 3 pages of posts, at the risk it might get ignore there I've started this new thread.

    Hiding Affiliate Link URL's?



    I used Donks code below (thanks Donk) originally placed in the thread linked above, and tried to adapt it for my site.

    MY site is a WORDPRESS blog, and the masking worked perfectly when my pages were in a sub directory, however for technical reasons I changed my product pages to WP pages, and since changing the masking doesn't work anymore and just opens a blank page?

    Can anybody please advise where I might be going wrong?

    This is in my body where the product details appear
    PHP Code:
      if (!$result) {
    $message 'Invalid query: ' mysql_error() . "\n";
    $message .= 'Whole query: ' $query;
    die(
    $message);
    }

    while (
    $data mysql_fetch_array($result))
         {
             
    extract($data);
             
        echo 
    "<div id='shopItem'>";       

             echo 
    "<div id='shopImage'>";     
             echo 
    "<a href='http://www.partydressesandmore.co.uk/link.php?product=".$data['id']."'><img src=\"" $data['image'] . "\" id='image' alt=\"" "\"></a></div>";
     
             echo 
    "<div id='shopDescription'><p class='shopDescription'>" $data['product']. "</p> <p>" $data['description']."</p></div>";

            echo 
    "<div id='price'><p class='price'> Price: &pound;".$data['price']. "</p>";
             echo 
    "<a href=".$data['link']."><img src='http://www.partydressesandmore.co.uk/wp-content/themes/revolution_magazine-30/images/more.jpg'  id='shopbutton' alt=''></a></div>";
            echo 
    "<div style='clear:both;'></div>";
            echo 
    "</div>";

         } 
    then the link page is
    PHP Code:
    <?php

    include ("db_connect.php");   // include your code to connect to DB.

    $sql="SELECT * FROM test WHERE id='".$_GET['product']."'";
    $resultmysql_query($sql);
    $data=mysql_fetch_assoc($result);
    if (
    $data['url']){
    $sql="INSERT INTO links VALUES ('".$_GET['Product']."','otherdata','ipaddress')";
    $resultmysql_query($sql);
    header("Location: ".$data['link']);
    exit;
    }
    else
    {
    // failure code
    }
    ?>
    Haven't got round to the INSERT yet until I can get the masking of the URL bit working.

    Very new to php so forgive my Thickness and thanks to Donk for original code.

    Paul[/QUOTE]

  2. Join Date
    Dec 2008
    Posts
    6
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hiding Affiliate Link URL's?

    This looks really complicated. Why don't you use a simple 301 redirect?

  3. Join Date
    Nov 2007
    Posts
    363
    Thanks
    25
    Thanked 48 Times in 43 Posts

    Re: Hiding Affiliate Link URL's?

    There is also various link cloaking plugins for wordpress available.

    ø Link Cloaking Plugin for WordPress | W-Shadow.com ø

    Mike

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Affiliate Friday - Crazy Eco Offers - Save Money & The Environment
    By EddiesEssentials in forum Affiliate Window - Promotions
    Replies: 2
    Last Post: 03-11-08, 02:12 PM
  2. Affiliate Blogs you read?
    By haynesey in forum Affiliate Marketing Lounge
    Replies: 7
    Last Post: 23-09-08, 11:51 AM
  3. Euroffice August Affiliate Newsletter
    By Jon@euroffice in forum TradeDoubler
    Replies: 0
    Last Post: 01-08-07, 05:37 PM
  4. Euroffice August Affiliate Newsletter
    By Jon@euroffice in forum Paid On Results
    Replies: 0
    Last Post: 01-08-07, 05:36 PM

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

Content Relevant URLs by vBSEO 3.5.0 RC1 PL1