Home     Articles & Projects     Products & Web Services     Forum

Universal redirect script.

Will this affect pricetapestry. I have enabled url cloaking in pricetapestry but other parts of my website I post banner and text ads and would like to hide the affiliate links. Pricetapestry aleady has a jump.php file.

Hi, It will work fine

Hi,

It will work fine alongside Price Tapestry - but you will need a different name - go.php is a good alternative!

Cheers,
David.

Ok I uploaded the scripts so

Ok I uploaded the scripts so will the script automatically change the links or do I have to go and add this to the links?
"jump.php?id=".jumplib_getID("http://www.example.com/")

That's correct - but

That's correct - but changing the filename to whatever you have used, for example:

"go.php?id=".jumplib_getID("http://www.example.com/")

Cheers,
David.

Wow I thought it would do it

Wow I thought it would do it automatically.I have too many links to try to go add that to each link on my site.

Hi Adrian, Ah - sorry about

Hi Adrian,

Ah - sorry about that; no i'm afraid it won't replace existing links if they're hard coded into HTML and you're not generating the links dynamically...

Cheers,
David.

Most of my links are called

Most of my links are called from my database. Hoe would I go about cloaking those links thats in my database?

Hi Adrian, You basically

Hi Adrian,

You basically need to do it when you are generating the HTML after reading the links from the database.

This is where, instead of simply writing out the link itself, you write the jump (or "go") link itself.

Would you be able to post a snippet of code that you are currently using to read links from the database and then display them in your page?

I believe this is the code.

I believe this is the code. I has some one build the site for me and I'm not that familiar with php.

$logolink  = "<a target=\"_blank\" href=\"$affliateurl\"><img border = \"0\" src=\"{$seo_merchant_path}$uploaddir$semer\"></a>";

$sale_image = "<a target=\"_blank\" href=\"$sale_affliateurl\"><img border = \"0\" src=\" $uploaddir$sale_imgSrc\"></a>";

Hi Adrian, Yes - that looks

Hi Adrian,

Yes - that looks like it. I've trimmed your post down to the only section of the code you posted that generates links; so that would be where it needs to be modified to point to the jumplib.

Assuming that you have used a file called go.php instead of jump.php; and it is in the top level directory of your site; the changes to the above section would look something like this:

$logolink  = "<a target=\"_blank\" href=\"/go.php?id=".jumplib_getID($affliateurl)."\"><img border = \"0\" src=\"{$seo_merchant_path}$uploaddir$semer\"></a>";

$sale_image = "<a target=\"_blank\" href=\"/go.php?id=".jumplib_getID($sale_affliateurl)."\"><img border = \"0\" src=\" $uploaddir$sale_imgSrc\"></a>";

Remember that jumplib.php must be included at the top of whatever page this code appears on, using:

require("jumplib.php");

(make sure that you've got a back-up of all your working, original files of course!)

Cheers,
David.

It works but only changes

It works but only changes the visit merchant link on my display page. The banner ads and text links didn't change. To see what I'n talking about chek out this page. http://www.megashoppingonline.com/shopmerchant/dELiA*s

Hi Adrian, Ah right - that

Hi Adrian,

Ah right - that helps see what else is going on.

Could you perhaps email me the file that you posted part of earlier and i'll see where else the changes may need to be made (reply to your Price Tapestry reg code email if you haven't got my address in your book - I've not setup this domain for email yet)....

Cheers,
David.