I see this request posted here now and then, but I want a slightly different solution than some others. If someone could post some basic php code to do this, I'd send you like $30 or so via paypal. I would like you to just post the code so that others here can use it and it will be my small contribution to the forum.
Here's what I want... I want to create a database with two tables. Table 1 has two fields... id and url. I can then redirect urls by calling the id number as a parameter and the page redirects to the url in the url field. Thus, if my script is on a page called "redirect.php", then mysite.com/redirect.php?url=324 takes me to the url from the table corresponding to id number 324.
But, I also want a separate table that records some basic stats about the click, such as referring site, date/time, url id from the other table, and user's ip address. This way I can monitor referrers for different campaigns in my content network ads for exclusion. I know this could get ever more complicated were I to ask for search strings etc., but for now this would work fine for me and would be a good starting point for all of us non programmers.
If you have further questions... ask. Thanks
Here's what I want... I want to create a database with two tables. Table 1 has two fields... id and url. I can then redirect urls by calling the id number as a parameter and the page redirects to the url in the url field. Thus, if my script is on a page called "redirect.php", then mysite.com/redirect.php?url=324 takes me to the url from the table corresponding to id number 324.
But, I also want a separate table that records some basic stats about the click, such as referring site, date/time, url id from the other table, and user's ip address. This way I can monitor referrers for different campaigns in my content network ads for exclusion. I know this could get ever more complicated were I to ask for search strings etc., but for now this would work fine for me and would be a good starting point for all of us non programmers.
If you have further questions... ask. Thanks