+ Reply to Thread
Results 1 to 3 of 3
Thread: Hiding Affiliate Link URL's?
-
Registered User
- 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
then the link page isPHP 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: £".$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>";
}
Haven't got round to the INSERT yet until I can get the masking of the URL bit working.PHP Code:<?php
include ("db_connect.php"); // include your code to connect to DB.
$sql="SELECT * FROM test WHERE id='".$_GET['product']."'";
$result= mysql_query($sql);
$data=mysql_fetch_assoc($result);
if ($data['url']){
$sql="INSERT INTO links VALUES ('".$_GET['Product']."','otherdata','ipaddress')";
$result= mysql_query($sql);
header("Location: ".$data['link']);
exit;
}
else
{
// failure code
}
?>
Very new to php so forgive my Thickness and thanks to Donk for original code.
Paul[/QUOTE]
-
Registered User
- 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?
-
Registered User
- 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
-
Affiliate Friday - Crazy Eco Offers - Save Money & The Environment
By EddiesEssentials in forum Affiliate Window - PromotionsReplies: 2Last Post: 03-11-08, 02:12 PM -
Affiliate Blogs you read?
By haynesey in forum Affiliate Marketing LoungeReplies: 7Last Post: 23-09-08, 11:51 AM -
Euroffice August Affiliate Newsletter
By Jon@euroffice in forum TradeDoublerReplies: 0Last Post: 01-08-07, 05:37 PM -
Euroffice August Affiliate Newsletter
By Jon@euroffice in forum Paid On ResultsReplies: 0Last Post: 01-08-07, 05:36 PM


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks