473,386 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Many Domains

150 100+
i have site i want to translate it other languages, run the site with separate comments and forums.

I was thinking to make swedish and polish sites first, If user gets invite he registers in .sw, he gets account in swedish site and in international (.com). but if he is banned/warned in one, he is banned in all other too.

staff in international site can manage(edit,delete) all his files, in all sites, .sw site can manage only their own files.

if user uploaded his files in .sw site, it is uploaded to .sw and international wtih [hu] in front. for it... If files is uploaded into international site, it is uploaded only there, nowhere else.

For international (.com) site each user can choose in his profile if he wants to see only international site files or all, from all sites.

Each site has it's own: Forums, comments, news, polls and blogs.

how can i do that put keeping the functionality the same for the other sites, in other words if i changed the php code in site effect the others ?

and use one DB for the sites or use for every site it's own DB ?
Feb 19 '09 #1
10 1525
TheServant
1,168 Expert 1GB
So have you re-written everything for each site? Does each site have different databases? If not, do you record which site a user is part of? Could you?
Feb 20 '09 #2
smartic
150 100+
So have you re-written everything for each site?
I'm only making the structure for the whole sites, and i need good structure for them,for the forums it's good idea for every site to have there own DB put for the site it self i need only the translation only that will be changed put the functionality the same for every domain.
Does each site have different databases?
i plan to register for each site to have there domain name.
Feb 20 '09 #3
Atli
5,058 Expert 4TB
Hi.

You could have all domains point to the same server and serve content based on the URL the client actually requested.

Like, if you had example.com, example.pl and example.se, all pointing to the same server, this would print a welcome message based on the URL used to connect:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. switch($_SERVER['HTTP_HOST']) 
  3. {
  4.     case "example.pl":
  5.         echo "Some Polish welcome phrase.";
  6.         break;
  7.     case "example.se":
  8.         echo "Some Swedish weclome phrase.";
  9.         break;
  10.     default:
  11.         echo "Default weclome, for the .com domain.";
  12. }
  13. ?>
Using this technique, you could translate the entire page, show different content (forums, blogs, etc...), and even use different databases.
Feb 20 '09 #4
smartic
150 100+
put this technique it need to have the same PHP files on every domain, and that will be hard to update if i found bug in my code, this technique will force me to upload the whole code again on every domain,what i need is to upload the php files only in .com and other domains have only the index page that will use the code that you have presented Atli and read the code from the .com.
example for "http://example.sw/index.php" :

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. switch($_SERVER['HTTP_HOST']) 
  3. {
  4.     case "example.sw":
  5.         require('http://example.com/code/php/sw');
  6.         break;
  7.     case "example.se":
  8.         require('http://example.com/code/php/se');
  9.         break;
  10.     default:
  11.         require('http://example.com/code/php/');
  12. }
  13. ?>
Feb 20 '09 #5
Atli
5,058 Expert 4TB
You can host multiple domain names from the same server and have it serve the same files for both.

For example, you could have both example.com and example.net point to the same server, so if I were to request either of these:
- http://example.com/index.html
- http://example.net/index.html

They would both load the same file, located at (for example):
- http://208.77.188.166/index.html

This is what the technique I mentioned above was aimed at.
That would obviously not fit if you intended to host each domain name on a separate server.
Feb 20 '09 #6
wizardry
201 100+
How about the language conversion;

how do we get the language converson for instance as per previous statements

example.pl polish
example.sw swedish

is their a module for php to out put the data stored in utf8_unicode_ci to the requested domain name?

if so how?
Feb 21 '09 #7
Atli
5,058 Expert 4TB
@wizardry
I don't get the question.

In that scenario, both domains point to the same file, which can be a .php file.
PHP can determine which domain was actually requested, as demonstrated by the example in my first post.

Using that, you can have PHP act differently based on the requested domain.
You could even have it load different databases, include different PHP files, use different output formats or different character sets.

If the user requested the Polish domain, you would have it speak Polish. If it requested the Swedish domain, have it speak Swedish.
Feb 21 '09 #8
wizardry
201 100+
hello -

i understand tht it's pointing to the index and then the index decides which domain its going to on ethnicity.

what i would like to know is there a language pack or something to convert your english already designed .php page, to say sweedish language in php?

the way i designed my db is to handle multiple languages. i just cant find a way to convert the existing model over to the new language.

thanks in advance for your help.
Feb 21 '09 #9
Markus
6,050 Expert 4TB
Have a look at the gettext() function. You won't be able to convert everything perfectly, and you'll have to rewrite your code a little bit ... or a lot.

PS. sorry for butting in :P
Feb 21 '09 #10
wizardry
201 100+
no problem i'm looking into utf8 now for php encoding to new language. i will look into the gettext().
Feb 21 '09 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: d.schulz81 | last post by:
Hi all, We have about 10 different domains that are linked very closely and we want to identify and keep track of every single user that surfs our websites by the use of sessions. The problem...
7
by: | last post by:
I think I may have a problem with the user of cookies in my centralized logon and registration system that I hoped could be consumed by all the sub-domains on my remote host IP. I built the...
1
by: Silver Arrow | last post by:
Iframe ReturnValue returns undefined if domains are not the same I am using a modal window and an iFrame to try and pull a return value back. IMPORTANT : I am doing this across domains. Main...
6
by: onetitfemme | last post by:
Domain are very cheap now adays. What would be the pros and cons of using different hosts served from the same server, say: www.blogyourbrainoff.com and www.yourbusiness.com
1
by: Paul Fi | last post by:
I have some confusions about the two, is it possible to create threads inside a particular domain and have other threads created in another domain or do we create threads that will manipulate app...
3
by: Marc Eggenberger | last post by:
Hi there. I have the following environment: Active Directory running on Windows 2000. There is a root domain called ad.sys and within this root domain there are the following subdomains: ...
7
by: Lance Barger | last post by:
I have been developing several web applications in VB.NET. I have started to notice that when I run one of the applications, all the assemblies for that application get loaded PLUS all the...
6
by: Ludvig | last post by:
I have various domains using the same application/assembly They differ in contents and design, based on a "site id", and get its information from an SQL server. Now I have to deploy the...
7
by: Doug | last post by:
An ASP.NET session cookie set on "www.mydomain.com" can not be accessed on "search.mydomain.com"; hence, a new session and cookie are being created on every sub-domain. This is occuring because...
6
by: BD | last post by:
Hi, all. I need to enforce a one-to-many relationship on 2 tables, with a join table. Say the join table contains account information. It has cust_no and acct_no. Both cust_no and acct_no are...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.