UK Webmaster Talk - Online Marketing - SEO


 

Bit Of Help Pwease

This is a discussion on Bit Of Help Pwease within the Php and MySQL forums, part of the Programming / Scripting / Coding category; Hallo all. Still working on my image hosting site; and i need a script. mm'kay; Im going to park many ...


Go Back   UK Webmaster Talk - Online Marketing - SEO > Website Design & Development > Programming / Scripting / Coding > Php and MySQL

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices

Reply

 

LinkBack Thread Tools Display Modes
Old 09-07-2005, 13:49   #1 (permalink)
Senior Member
 
Join Date: Apr 2005
Posts: 1,088
iTrader: 0 / 0%
Departed is a name known to allDeparted is a name known to all
Default Bit Of Help Pwease

Hallo all.

Still working on my image hosting site; and i need a script.

mm'kay; Im going to park many domains to my image hosting site after buying a couple of traffic ones, but the header is for the main domain.

Is there a script out there that gets the url, then displays a certain image dependant on what is in the url address bar?

Something like this:

PHP Code:
If some funtion www.blah.com

echo "<img src = "a">"

If  some function www.blah2.com

echo "<img src = "b">" 

Again WMT? up for grabs;

Ty
__________________
-Gary
Departed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-07-2005, 11:11   #2 (permalink)
Newbie
 
Join Date: Jun 2005
Posts: 17
iTrader: 0 / 0%
mahangee is on a distinguished road
Default

I haven't tested this but it should work.

The eregi function http://php.net/eregi
PHP Code:
<?php
$self 
$_SERVER['PHP_SELF']; //Gets the documents address
if (eregi('domain1.com'$self)) { //Looks in the url for the string domain1.com
    
echo "<img src='domain1.com banner'>";//You know the rest :D
} elseif (eregi('domain2.com'$self)){
    echo 
"<img src='domain2.com banner'>";
} else {
    echo 
"$*%T happens :D";
}
?>
mahangee is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-07-2005, 12:04   #3 (permalink)
Senior Member
 
Join Date: Apr 2005
Posts: 1,088
iTrader: 0 / 0%
Departed is a name known to allDeparted is a name known to all
Default

That didnt seem to work, but ive got this on phpfreaks which im going to use.

PHP Code:
<? if (isSet($_SERVER['HTTPS']))
  
$protocol = (== strcmp(strtolower($_SERVER['HTTPS']), 'on')) ? 'https://' 'http://';
else
  
$protocol 'http://';

$URL $protocol $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];

if (isSet(
$_SERVER['QUERY_STRING']))
   
$URL .= '?' $_SERVER['QUERY_STRING'];

echo 
'URL is: '$URL;
?>
I'll then edit it to show certain things dependant on what $URL is.

I'll send 100 over just for trying
__________________
-Gary
Departed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
bit, pwease

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Can We Pwease Have... Departed Comments / Suggestions 1 31-07-2005 21:27


All times are GMT +1. The time now is 18:09.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
UK Webmaster Forum © WebmasterTalk.co.uk | Design by Forbairt

Ad Management by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41