Need a referral-branded site
Hello,
I am the webmaster for four corporately owned radio stations, and we're doing a cross-station promotion. I need to come up with a way to brand the site for the promotion site depending on which radio station site the user clicked through from.
The solution I came up with from my PHP background was to do the following:
*4 seperate directories for branding assets (graphics)
*PHP finds the referring website and sets the working directory variable to the one that corresponds to the website (if the user came from KSLF for example, then $asset_path = "/KSLF";
*Then insert strands of PHP into the HTML of the page:
/logo.png> etc etc.
This works, but makes for ugly HTML code.
Any suggestions?
Thanks,
Busy posted this at 08:32 — 31st January 2006.
He has: 6,151 posts
Joined: May 2001
You'd need a default image incase the referring website isn't found or person comes from bookmark or other means.
You can't use radiostaionxyz.com/camefrom=here type thing? (using series of numbers instead of words).
Or if all sites on same server maybe a form and use _POST method ?
skadet posted this at 16:48 — 31st January 2006.
They have: 5 posts
Joined: Jan 2006
Any of those would be fine, I think my question was more about implementing the variables in the HTML more than anything. Is that snippet above they way it's gotta happen?
Thanks,
Busy posted this at 20:01 — 31st January 2006.
He has: 6,151 posts
Joined: May 2001
If your just talking one image it should be fine, if you're talking about a whole layout then maybe a switch statement at the top of your page and have all your details (image names, site name ...) set as variables, so your code would be something like
Welcome to
<?php
echo $sitename;
?>
" width="??" height ...
If the images were different sizes then using getimagesize() would be better
I used long and short PHP tags in above, keep to what you perfer or know best
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.