Beorn
In the shadows
- Joined
- Aug 18, 2001
- Messages
- 1,634
How TTF works
There are a lot of ways to describe how TTF works. The most basic description is, "Your computer requests information from TTF's computer. TTF's computer formats that information all nice and pretty, and sends it back"
Well, that really is all it does. When you go to your browser (lets assume in this article, if you will, it's Internet Explorer) and type 'http://thetolkien.forum', a lot happens. First lets break up that URL. Oh, yeah. A URL is a Uniform Resource Locator. Itâs a way of pointing to something on the internet (more on that idea later). The URL contains a lot of parts. First is http://. That tells your computer to work with the rest using the HTTP, AKA Hyper-Text Transfer Protocol. That doesnât matter, except that itâs different from other protocols, such as FTP (File Transfer Protocol). Then, the URL says, contact the machine called WWW in the area called thetolkienforum.com. Your computer assumes you mean the bottommost directory, and adds a / on the end.
But, the internet doesnât care whether itâs called snorkel.someplace.qas. Thatâs where DNS comes in. DNS stands for Domain Naming System. Your computer contacts your ISPâs (Internet Service Providerâs) DNS machine. Your computer asks, âWhat is the IP address for thetolkienforum.comâs DNS machine?â The DNS machine responds with an IP. An IP is a four part number. Each part is separated by a period. Each part is a number from 0 to 255. An example would be 1.2.3.4, or 65.92.4.214. The point is this: all computers on the internet, or on networks, have IP addresses. The IP address is like your mailing address. It tells where data (called âpacketsâ) should go. Your computer then contacts the DNS machine for âthetolkienforum.comâ, and asks, âWhat is the IP for www?â It responds with â209.126.174.240â.
Now, we know where thetolkien.forum is. But, there isnât a wire directly between your computer and TTF. There are millions of computers out there on the internet. Connecting each one would be impossible. So, your computer says to the one that itâs connected to, âSend this to 209.126.174.240.â That computer says to another, âSend this to 209.126.174.240, and tell it that itâs from Your IPâ, where Your IP is your IP address. That says to another computerâŠ.You get the point. It takes somewhere around 15 of these âhopsâ to get from one computer to another on the internet.
Your computer sends this to TTFâs machine. This is an example of the HTTP Protocol:
Now, you can stop here, and go on your merry way. The above was a simplified version of the internetâŠbut if you want to understand how TTF works, carry on.
So, the server says, âOK, Iâll take a look and see whatâs in index.php.â The â.phpâ on the end is important. It says that there will probably be code in a language called PHP in the file. Lo and behold, there is. The code gives instructions on how to dig up and format the information that will be returned to your computer. The code says first to connect to a database. A database is a giant store of information. All of TTFâs posts, threads, announcements, members, PMs, etc, are in a database. Once the code has connected to the database, it requests information with what are known as queries. One query may be:
The templates are why TTF looks so neat. Itâs all repetition. A post always looks the same as the one before it because only the words in a post are saved, not the whole look of it.
So, once the stuff is in templates, the server sends it all back to your IP. Your computer gets HTML back. The HTML is Hyper-Text Markup Language. Basically, it tells your computer how to structure text. The text is structured, and put in place, and you see it.
So, Iâll be taking questions nowâŠ.
There are a lot of ways to describe how TTF works. The most basic description is, "Your computer requests information from TTF's computer. TTF's computer formats that information all nice and pretty, and sends it back"
Well, that really is all it does. When you go to your browser (lets assume in this article, if you will, it's Internet Explorer) and type 'http://thetolkien.forum', a lot happens. First lets break up that URL. Oh, yeah. A URL is a Uniform Resource Locator. Itâs a way of pointing to something on the internet (more on that idea later). The URL contains a lot of parts. First is http://. That tells your computer to work with the rest using the HTTP, AKA Hyper-Text Transfer Protocol. That doesnât matter, except that itâs different from other protocols, such as FTP (File Transfer Protocol). Then, the URL says, contact the machine called WWW in the area called thetolkienforum.com. Your computer assumes you mean the bottommost directory, and adds a / on the end.
But, the internet doesnât care whether itâs called snorkel.someplace.qas. Thatâs where DNS comes in. DNS stands for Domain Naming System. Your computer contacts your ISPâs (Internet Service Providerâs) DNS machine. Your computer asks, âWhat is the IP address for thetolkienforum.comâs DNS machine?â The DNS machine responds with an IP. An IP is a four part number. Each part is separated by a period. Each part is a number from 0 to 255. An example would be 1.2.3.4, or 65.92.4.214. The point is this: all computers on the internet, or on networks, have IP addresses. The IP address is like your mailing address. It tells where data (called âpacketsâ) should go. Your computer then contacts the DNS machine for âthetolkienforum.comâ, and asks, âWhat is the IP for www?â It responds with â209.126.174.240â.
Now, we know where thetolkien.forum is. But, there isnât a wire directly between your computer and TTF. There are millions of computers out there on the internet. Connecting each one would be impossible. So, your computer says to the one that itâs connected to, âSend this to 209.126.174.240.â That computer says to another, âSend this to 209.126.174.240, and tell it that itâs from Your IPâ, where Your IP is your IP address. That says to another computerâŠ.You get the point. It takes somewhere around 15 of these âhopsâ to get from one computer to another on the internet.
Your computer sends this to TTFâs machine. This is an example of the HTTP Protocol:
. That says, âGive me the output for /. Iâm using HTTP version 1.0, and Iâm trying to talk to thetolkien.forumâ. Itâs important that your machine specifies the name of the computer it wants. A computer can have different names. For example, the computer named thetolkien.forum is also named www.middle-earth-rpg.com. The server, as it is called because it serves everyone else, needs to know what your computer is looking for. The server says, âI know that / should be considered a file called index.phpâ because of how the server is configured.GET / HTTP/1.0
Host: thetolkien.forum
Now, you can stop here, and go on your merry way. The above was a simplified version of the internetâŠbut if you want to understand how TTF works, carry on.
So, the server says, âOK, Iâll take a look and see whatâs in index.php.â The â.phpâ on the end is important. It says that there will probably be code in a language called PHP in the file. Lo and behold, there is. The code gives instructions on how to dig up and format the information that will be returned to your computer. The code says first to connect to a database. A database is a giant store of information. All of TTFâs posts, threads, announcements, members, PMs, etc, are in a database. Once the code has connected to the database, it requests information with what are known as queries. One query may be:
. This asks the database, âGive me all the forum ids and their corresponding titles from the table named forum.â A table is, well, a table. Each row is one data entry. One row in the user table is a member. One row in the post table is a post. Each row has different fields. A row in the user table may have userid, username, e-mail address, AIM, MSN, ICQ, Yahoo, and all your preferences. The database responds, the forum takes all the information, and puts it into templates.SELECT forumid, title FROM forum
The templates are why TTF looks so neat. Itâs all repetition. A post always looks the same as the one before it because only the words in a post are saved, not the whole look of it.
So, once the stuff is in templates, the server sends it all back to your IP. Your computer gets HTML back. The HTML is Hyper-Text Markup Language. Basically, it tells your computer how to structure text. The text is structured, and put in place, and you see it.
So, Iâll be taking questions nowâŠ.


