Forum Moderators: coopster
I have a setup where I have my sponsor links from my pages going to a sponsor.php by product which I then redirect to the sponsor.
Right now, when I want to change the sponsor I'm sending traffic to I have to open Notepad and change the sponsor.php page then upload it to my server.
What I'd like to do is write an admin page that allows me to change all my sponsor pages from one page and then have that update all of my pages.
My line of thinking was to have the admin page write to a file that could be included in each sponsor.php page that could assign the sponsor url to a variable then pass it in to redirect the page.
I've seen lots of things that are similar to this but nothing that seems to work like I'm hoping. Is this even possible?
Does anyone have any ideas or a link to a tutorial that can point me in the right direction?
Thanks in advance for your help :)
Take care,
Michael
Your pages have within them link to sponserX.php
sponserX.php redirects to the real url for sponserX?
If so - I suggest a redesign:
have your links as sponser.php?sponsorid=6
ie, use an argument, and always use the same sponser.php file name for all sponsers (different argument)
in the sponser.php you would have:
switch ($_REQUEST['sponsorid'])
{
case "6" : {$goto="http://*thesponsor.url"; break;}
case "7" : {$goto="http://*theothersponsor.url"; break;}
}
.... do your normal redirect code to $goto
thanks for the reply.
to clarify my current setup:
on my pages i have all my links for various products each linking to one page for that product.
for instance, i have all of my links for blue widgets link to bluewidgets.php on my server, where i then use this page to redirect to the blue widget sponsor that is converting best for me at the time. if one sponsor is converting poorly i can change this one page and have all of my links directed to a new sponsor.
would the example that you gave me work for this setup?
thanks again :)
take care,
michael
yes, I have mysql available, but I'm just working on building my first database driven site, so I'm still very shaky on how to do most things.
I had thought that the db solution would be a good idea for the future, but i hadn't figured out how, so i was going to hedge my bets with a php solution.
i guess right now would be the best time to implement the db functionality, so its good that i started asking these questions before i got too far along. :)
thanks for your help.
take care,
michael
Another thing I've wanted to do but haven't tried, and thought I could do with the php page was have a small script that rotated hits thru a list of sponsors to spread the hits around and determine which sponsors are converting.
akso, a few of my sponsors have different landing pages for the same product, so it would be nice also to be able to determine which of the landing pages convert best by trying them all.
i imagine all of these things are possible, i'm just wondering if they are possible at the same time?
thanks again for your help.
take care,
michael