Is it possible to have one php page that uses a switch to show a certain image based off a subdomain that accessed that page? For example, http://www.mysite.com/example1 would show example1.jpg, whereas http://www.mysite.com/example2 would show example2.jpg? I have a print form that I would like to have someone be able to print from the page but there are over 50 different subfolder names that are used in our offline url’s.
Hope this makes sense and something like a switch could do the trick with this.
Thank you for any help you can give.
Yeah, all you need to do is parse out the request URI, depending on whether or not its gonna have more information. but you could have this
<img src="<?php echo $_SERVER['REQUEST_URI']?>.jpg" />in its simplest form. Havent tested, but i think this is right
if you want it more complicated, you could do something like this