Jump to content

Megami

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by Megami

  1. >>requinix Now it's working correctly! Now I have a final question for today (which is just 5 minutes left until the next day): I know there is a variable for PHP to add subdomains automatically, but I forgot how it was called.
  2. >>Rifts The "echo $_SERVER["HTTP_HOST"]" part worked, but adding "http://" gave no difference. >>BlueSkyIS It's working, but not like it suppose to be. Now all the text is for Castelia (Hiun also desplays Castelia text). Code is now: <h2>Welcome</h2> <p>Welcome to the site.<br /> <?php if ($_SERVER["HTTP_HOST"] == 'http://hiuncity.com') { print "Hiun City, the largest city in the Isshu Region, has finally been opened!<br />"; } else { print "Castelia City, the largest city in the Unova Region, has finally been opened!<br />"; } ?> We finished the site, so no big things will happen, from now on.<br /> We keep developing this project, and The CW-Network gives you Best Wishes.<br /> You're always welcome, visiting our city, working in our city, living in our city, or whatever you like!</p> <audio autoplay="autoplay" loop="loop"> <source src="files/bgm/hiun.ogg" type="audio/ogg" /> <source src="files/bgm/hiun.mp3" type="audio/mpeg" /> Your browser does not support the audio element. </audio>
  3. >>Rifts It didn't work. My code is: <?php $_SERVER["HTTP_HOST"] ?> <h2>Welcome</h2> <p>Welcome to the site.<br /> <?php if ($_SERVER["HTTP_HOST"] == hiuncity.com) { print "Hiun City, the largest city in the Isshu Region, has finally been opened!<br />" } elseif ($_SERVER["HTTP_HOST"] == www.hiuncity.com) { print "Hiun City, the largest city in the Isshu Region, has finally been opened!<br />" } elseif ($_SERVER["HTTP_HOST"] == www.casteliacity.com) { print "Castelia City, the largest city in the Unova Region, has finally been opened!<br />" } else { print "Castelia City, the largest city in the Unova Region, has finally been opened!<br />" } ?> We finished the site, so no big things will happen, from now on.<br /> We keep developing this project, and The CW-Network gives you Best Wishes.<br /> You're always welcome, visiting our city, working in our city, living in our city, or whatever you like!</p> <audio autoplay="autoplay" loop="loop"> <source src="files/bgm/hiun.ogg" type="audio/ogg" /> <source src="files/bgm/hiun.mp3" type="audio/mpeg" /> Your browser does not support the audio element. </audio> I also tried "echo" instead of "print", but it gave me the same results.
  4. >>requinix No, I mean that the content differs from used domains, not to see which domain has been used. If you now go to one of the 2 domains, the site is identical to each other. What I want is, make the Japanese names viewable for Hiun City, and the English names viewable for Castelia City. I know it's something with "If/Else". Sorry, I'm a total n00b about PHP, I know HTML better.
  5. Hi all, I have a project for a while. Since the games get their English release (Pokémon Black and White), I'd like to make content differ between domain names, but at the same time, it needs to be in the same files. For example: If someone accesses the site, using HiunCity.com, they'll need to see this: "Hiun City, the largest city in the Isshu Region, has finally been opened!" But if they access the site, using CasteliaCity.com, it has to be: "Castelia City, the largest city in the Unova Region, has finally been opened!" I'm sure there's a PHP Code for this. Thanks in advance! 女神
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.