Creating a dynamic website header

  • africancures
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Apr 04, 2009
  • Posts: 5
  • Status: Offline

Post April 4th, 2009, 8:04 am

I don't even know where to start with this one, let me try explain this:

I am looking for ideas on how to create some sort of dynamic header for an affiliate website, we have launched a new affiliate program for http://www.africancures.com/ the affiliate program is done through 1shoppingcart.com and each affiliate is given an ID like:

http://www.1shoppingcart.com/app/?af=812264

Once the affiliate signs up they choose their own website URL like: mikeshealth.com, then we point the affiliate URL mikeshealth.com to http://www.1shoppingcart.com/app/?af=812264 which in turn comes to our main website: http://www.africancures.com/ now here is where the problem comes in, how do I make the website display Mikes Health instead of African Cures .

I hope I was able to explain this well enough as it seems to be a bit confusing to me when I write it down. I really hope there is someone out there who has worked on something like this before or if there is someone who thinks they know how to do this.

Thank you

So here is something else I was thinking of, but I am not much of a programmer anymore:
Have a list of all the affiliate ids and their corresponding website names, eg:
Affiliate ID=812264 Website name= Mikes Health, then when someone comes to the site the jave works out which affiliate id sent them to the site, eg

Get(AffiliateID)from Refering.URL then Display.Header(AffiliateID) on main page.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post April 4th, 2009, 8:04 am

  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Joined: Jul 25, 2005
  • Posts: 2735
  • Loc: Nashville, TN
  • Status: Offline

Post April 4th, 2009, 8:26 am

african cures, I believe you've answered your own question, all you need to do is specify the image you would like to display based on the id passed. I'm assuming there's a database involved in storing and retrieving your affiliate id and image key/values. That being said, what server-side language will you be using?
I'd love to change the world, but they won't give me the source code.
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Joined: Jul 25, 2005
  • Posts: 2735
  • Loc: Nashville, TN
  • Status: Offline

Post April 4th, 2009, 8:37 am

Hrmm, if you wanted to avoid the database, you could always use the affiliate ID (assuming its unique) as the image name, for instance:

PHP:
Code: [ Select ]
echo "<img src=\"".$_REQUEST['af'].".jpg\" />";


Java:
Code: [ Select ]
<img src="<%= request.getParameter("af") %>.jpg" />


Both of these assume that you would have named the header '812264.jpg'
I'd love to change the world, but they won't give me the source code.
  • africancures
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Apr 04, 2009
  • Posts: 5
  • Status: Offline

Post April 4th, 2009, 8:59 am

UPSGuy,
Thank you for that response, I am hosting on GoDaddy Unix server and the affiliate program is run through 1shoppingcart.com, if you look at the current website (http://www.africancures.com) the heading it just text, it is not an image.

What code would I use to pull the affiliate ID 812264 out of the refering link: http://www.1shoppingcart.com/app/?af=812264, then check this against my own little list eg. 812264=Mike Health.

I am a chop when it comes to programming, would you help me for $50?
  • africancures
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Apr 04, 2009
  • Posts: 5
  • Status: Offline

Post April 4th, 2009, 9:16 am

I think it is even easier than what you think, I would need to have a list stored with all the affiliate IDs and then their related 'Web Names' eg: aff ID#812264 = 'Mikes Health Store'.
Then when the person types in MikesHealthStore.com the url redirects using http://www.1shoppingcart.com/app/?af=812264, somehow the site africancures.com pulls out the 812264 and then displays 'Mikes Health Store' in place of 'African Cures', and updates the title:
<title>African Cures | Prosit </title>
to
<title>Mikes Health Store | African Cures </title>

The other issue that I see is that when they go off the site for a while to purchase the product and they come back from the shopping cart, how will the site know it is them returning and then display 'Mike Health Store' again?
  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Joined: Apr 09, 2008
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England
  • Status: Offline

Post April 5th, 2009, 2:37 am

africancures wrote:
The other issue that I see is that when they go off the site for a while to purchase the product and they come back from the shopping cart, how will the site know it is them returning and then display 'Mike Health Store' again?

You could set a cookie to save the ID for some time (Or even for ever if you wish) then get the site to look for that cookie and use the ID saved in it for the header! However the probelem you have there is telling the difference between "Mike Health Store" and say "The big store of health" or whatever so the cookie will have to not just save the name of the site i.e. Mike Health Store but also a ID not used by anyone else for that member/website but if each member has a ID anyway just use that!
^__^
  • kz1398
  • Born
  • Born
  • No Avatar
  • Joined: Apr 16, 2009
  • Posts: 1
  • Status: Offline

Post April 16th, 2009, 10:19 am

I hate to necro post a bit, but nothing in this thread worked for me. I tried $_GET, $_REQUEST, even $_POST.

I cannot get the ?af out of the original affiliate link.

Has anyone had experience with this before?
  • Bogey
  • Bogey
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 8211
  • Loc: USA
  • Status: Offline

Post April 16th, 2009, 5:44 pm

It would be $_GET['af'] if the ?af is in the link (In the address bar).
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • africancures
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Apr 04, 2009
  • Posts: 5
  • Status: Offline

Post November 8th, 2011, 3:29 am

I got it to work!!! The site sends the people to a folder with the Aff ID, which then send the people to 1ShoppingCart and when they come back the cookie has their site header name;
  • africancures
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Apr 04, 2009
  • Posts: 5
  • Status: Offline

Post November 8th, 2011, 3:30 am

Sorry, I just didnt check back here for some reason, missing for two years, guess it would have been easier if some sent me mail at the website

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 122 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.