GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   What's a script that will.. (https://gfy.com/showthread.php?t=1058788)

onwebcam 02-24-2012 12:09 AM

What's a script that will..
 
We have around 500 names parked on 1 site and want a script to detect the domain a surfer arrives on and display that that name as the text/logo? We would be willing to pay for an actual logo that would change the name as well similar to the geo targeted banners. If you can do the later send me an email to sales (@) namenetwork.com to discuss.

k0nr4d 02-24-2012 12:25 AM

You can link all the domains to one place on your server with a single index.php, and just pull the current domain name out of $_SERVER

onwebcam 02-24-2012 12:37 AM

Quote:

Originally Posted by k0nr4d (Post 18778144)
You can link all the domains to one place on your server with a single index.php, and just pull the current domain name out of $_SERVER

They are all parked on the one script/site so all good with "single index.php". IE each appears as it's own site. In my been drinking state I somewhat get "just pull the current domain name out of $_SERVER" I imagine what you are saying is $_SERVER will call the domain? Not a php coder here.. But a master editor :) What I need is the code that does similar to change the site name text/logo so they "officially" become their own site.

k0nr4d 02-24-2012 02:13 AM

On that index.php, put
<?php echo $_SERVER['HTTP_HOST']; ?>

That will print out the name of the domain you are on.
You can then do something like:
<img src='/images/<?php echo $_SERVER['HTTP_HOST']; ?>.jpg'>
for instance to pull a custom logo for that site, or grab <?php echo $_SERVER['HTTP_HOST']; ?>.css to load a different template, or whatever.

That's a really simplified version of the idea but you should be able to elaborate from there.

k0nr4d 02-24-2012 02:15 AM

<?
$array = array(
"www.domain1.com" => "Site Name1",
"www.domain2.com" => "Site Name2",
"www.domain3.com" => "Site Name3"
);
?>
<img src="/logos/<? echo $_SERVER[HTTP_HOST]; ?>.jpg"><br>
Welcome to <? echo $array[$_SERVER[HTTP_HOST]]; ?>

asdasd 02-24-2012 02:17 AM

What he said

onwebcam 02-24-2012 02:23 AM

Quote:

Originally Posted by k0nr4d (Post 18778262)
<?
$array = array(
"www.domain1.com" => "Site Name1",
"www.domain2.com" => "Site Name2",
"www.domain3.com" => "Site Name3"
);
?>
<img src="/logos/<? echo $_SERVER[HTTP_HOST]; ?>.jpg"><br>
Welcome to <? echo $array[$_SERVER[HTTP_HOST]]; ?>

I'll fuck around with it tomorrow or Sat. Send me your paypal info to sales (@) namenetwork.com. Whoever solves my problem first gets some drinking money.

k0nr4d 02-24-2012 04:27 AM

Don't worry about

woj 02-24-2012 07:06 AM

If you still need help with it, hit me up icq: 33375924, or shoot me an email woj at wojfun dot com


All times are GMT -7. The time now is 11:48 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123