Current location: Hot Scripts Forums » General Community » Script Requests » Auto Add Affiliate ID


Auto Add Affiliate ID

Reply
  #1 (permalink)  
Old 11-24-08, 09:56 AM
phillyhotshots phillyhotshots is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Philadelphia
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Auto Add Affiliate ID

I have a website where people post links to products on Amazon, Overstock, etc. I'm looking for a script that will automatically recognize the retailer (store) and add my Affiliate ID accordingly. All of the user submitted URLs are currently stored by themselves in a table... although I don't know what is the best way to proceed.

Should I use .htaccess to send all links to a php file which adds the affiliate id and then redirects the visitor? Or should I create a script that automatically converts the link before its entered into the database?

Are there any free scripts that already do this?
Reply With Quote
  #2 (permalink)  
Old 12-04-08, 05:18 PM
phillyhotshots phillyhotshots is offline
Newbie Coder
 
Join Date: Jun 2003
Location: Philadelphia
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
I still can't figure out a way to do this. Does anyone know?
Reply With Quote
  #3 (permalink)  
Old 12-05-08, 01:17 PM
QualityEcommerce QualityEcommerce is offline
Newbie Coder
 
Join Date: Nov 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Hello:

I have not seen a script that does this. If you know PHP you could detected the URL and add the affiliate code when its being pulled from the database. It would be easier in my opininon to do it when its being pulled from the database.
Reply With Quote
  #4 (permalink)  
Old 12-05-08, 07:32 PM
markei markei is offline
New Member
 
Join Date: Dec 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by phillyhotshots View Post
I have a website where people post links to products on Amazon, Overstock, etc. I'm looking for a script that will automatically recognize the retailer (store) and add my Affiliate ID accordingly. All of the user submitted URLs are currently stored by themselves in a table... although I don't know what is the best way to proceed.

Should I use .htaccess to send all links to a php file which adds the affiliate id and then redirects the visitor? Or should I create a script that automatically converts the link before its entered into the database?

Are there any free scripts that already do this?
Problem as I see it:
1) You need to identify(within the code) which website you are linking to, so that you can add the appropriate Affiliate ID for that site.
2) Then you will need to add the corresponding ID code to the link to match the site, and output the link correctly on your site so that when it is clicked your personal affiliate link will be added to the link.
2a) If you want it redirected automatically you could output a javascript redirect after the Affiliate ID is added.
My solution:
1) Create a database with (website_name,affiliate_id) in each record
2) I would use php to match the website domain name to your database
3) Pair each site Affiliate ID link(such as &ID=yourAmazonaffiliate) with the website name(amazon.com) in the database, and add the ID to the URI when the correct site is found.

So, if the link is:
http://linksynergy.overstock.com/fs-bin/statform?offerid=57189&bnid=1085&subid=0&CID=11949 3&keywords=tag+heuer+watches

Your php code would loop through the database searching for a string match until it finds your overstock.com database entry, then it would add your ID from the same database record to the end of the URI, so it would output to the screen:

http://linksynergy.overstock.com/fs-bin/statform?offerid=57189&bnid=1085&subid=0&CID=11949 3&keywords=tag+heuer+watches&id=12345678912

I guess I am just expanding on QualityEcommerce's answer after looking back at it.
Since your Affiliate ID for each site will be personal to you, this would have to be a custom database script.
Optionally, instead of outputting the link to the screen, you could save them in another database table, and draw from that when displaying the links.

Hope it helps!
markei
---------------------
no sig yet

Last edited by markei; 12-05-08 at 07:43 PM. Reason: added more info
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Egold Payment Option ans Affiliate To Shopping cart (ebooks store) david01 Job Offers & Assistance 3 08-03-06 09:14 PM
Alter Table Help DDRcasey PHP 0 06-14-05 12:08 AM
Wanted : OSC Affiliate modifications nimitz_1061 Job Offers & Assistance 0 08-09-04 01:15 PM
Automate download delivery, create your own affiliate program with Pixie & Paypal listenmirndt General Advertisements 1 03-15-04 06:16 PM


All times are GMT -5. The time now is 09:22 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.