im looking to do the following maybe in php: issue affiliates with a unique code to track traffic they send to me only track unique visitors they send
Not that hard. Create a database with 2 tables. The first one for Affiliates with 2 columns: ID, Affiliate Name The second table to track visits with 2 columns: Related Affiliate ID, and IP Address of visitor. Have affiliates link to you with their ID in the link: mysite.com?id=222 When someone visits your site with the ID string present in the query string, check to see if their IP address is present in the second table for visitors. If it's not, then it's a unique visitor, and you can log their IP address in the second table, like this: '222', '192.168.1.1' IN ADDITION: Set a cookie in that visitor's browser, which will show that they've visited before. That way if their IP address changes, you can still know that they've been there before by the cookie. Of course, if they change their browser and their IP address, there's no way to track them.
You could probably get one of the programmers on here to whip that up for under $50. There are also affiliate scripts you can buy for a lot less if you want to go with the premade approach.