![]() |
|
It's time to learn me stuff |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Quote: All major protocols are based on TCP/IP. They are implemented on TCP/IP. Quote: Telnet is terminal protocol and AFAIK includes some escape codes to move cursor around and do other stuff which HTTP and FTP won't understand. AFAIK those escape codes aren't really apart of telnet its self, just the terminal you're running on (vt100, xterm, something). Just look at HTTP, NNTP, POP3 and friends, they are so simplistic, some text headers and maybe some content. -- |
Krzysztof Kluczek
Member #4,191
January 2004
![]() |
Quote: They are implemented on TCP/IP. That's what I meant. Quote: AFAIK those escape codes aren't really apart of telnet its self, just the terminal you're running on (vt100, xterm, something). Just look at HTTP, NNTP, POP3 and friends, they are so simplistic, some text headers and maybe some content.
In this case almost everything is based on telnet. ________ |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Most of them are -- |
X-G
Member #856
December 2000
![]() |
-- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Ok.. Lets just say the Telnet as I know it -- |
Krzysztof Kluczek
Member #4,191
January 2004
![]() |
MS Telnet has control codes too. Anyway, doesn't it sound strange to say that Quake 3 net code is based on telnet? (If HTTP was based on telnet and supports binary transmission, anything could be said to be based on telnet) ________ |
X-G
Member #856
December 2000
![]() |
Quote: anything equivelent to raw mode in putty
Raw mode is exactly that. A raw TCP/IP connection. Not telnet. -- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Does the quake3 protocol look anything like: Client: Possible data here. Server: data here ? edit: GET /index.html HTTP/1.0 200 OK HTTP/1.0 data here for 1024 bytes. yay. Theres alot more to http, but thats the basics. -- |
X-G
Member #856
December 2000
![]() |
Uhm, that's HTTP you're describing. Zorro didn't say anything about Q3 being based on HTTP... -- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
He said it was based on Telnet, Which I argue most of the limited antiquated common protocols are based on. I know HTTP, the others, not so much. -- |
elver
Member #3,670
July 2003
|
Tomasu, X-G informs me that you think HTTP is based on Telnet. Please stop believing that as it's not true. Thank you. Uhh... I need sleep. Exam in two hours! Bloody hell... |
Krzysztof Kluczek
Member #4,191
January 2004
![]() |
TF: I completely agree that many net protocols are text-based, but telnet isn't one of them despite of looking like one. Matthew said: Yes, the posts/threads here are all in the same table. The initial post has a parent id of 0 and all other posts have a parent id of the initial post. Doesn't it require too many database searches when displaying posts? It seems that it requires one query per post. Or are there other fields which accelerate searching? ________ |
X-G
Member #856
December 2000
![]() |
SELECT * FROM forum_posts WHERE parent='foo'; One query. Returns all posts in a thread. -- |
Krzysztof Kluczek
Member #4,191
January 2004
![]() |
Heh, I misunderstood it. I though they were linked in a list, which would require much more effort to access them. ________ |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Only if you want to show an entire thread, if its threaded, instead of just listed like it is here. -- |
X-G
Member #856
December 2000
![]() |
Perhaps one could have a system where every post stores not only its immediate parent, but every parent in its thread; so that a few levels down, for instance, a post could have a "parents" field like "1;15;24;27" or similar. It would take up a bit of space, but probably be faster than doing several queries to show an entire thread. -- |
Matthew Leverton
Supreme Loser
January 1999
![]() |
I store three ids: post_id, parent_id, root_id (In my case parent_id and root_id are always identical. ) Such a structure allows you to get all the threads in one query in the proper order if you grab associatively by [SORT BY parent_id, post_id] and can make the assumption that higher post id = later time. What you would do then is: 0 Grab Data from DB into $parents[0] = first post, $parents[$thread_id] = array of base posts, $parents[$post_id_X] = array of sub threads This only works though if you grab from the base of the thread. Ie, if you want to grab a specific sub thread, you are out of luck. If you wanted to do it with any thread, I'd probably create a lookup table like: 1 +-2 | +-3 | +-4 post_id | parent_id | direct_flag --------------------------------- 1 | 0 | 1 2 | 1 | 1 3 | 1 | 0 3 | 2 | 1 4 | 1 | 1 --------------------------------- You could do things like SELECT FROM post WHERE post_id IN (SELECT post_id FROM parent_link WHERE parent_id = $X AND direct_flag=1) That would give you all direct replies. Eliminate the direct_flag, if you want to get the entire list of children, and you could use the above mentioned method for looping through them without having to do a db query for each sub thread (ouch). |
23yrold3yrold
Member #1,134
March 2001
![]() |
Any advice on how to set up my system as an Apache server so I can test PHP/MySQL here? I found this, but it looks excessively painful. -- |
Kanzure
Member #3,669
July 2003
![]() |
Quote: download-this-file-and-double-click-it method? Sourceforge - search for "PHP Triad for Windows". |
ReyBrujo
Moderator
January 2001
![]() |
You using Windows? Download the latest Apache executable (I tried with the 1.3x something, the 2.x had something broken) and install it. Then install and configure MySQL. Finally, download PHP, put the module in the Apache directory, and edit httpd.conf to process PHP pages with PHP before showing them. That is basically what I did a year ago and worked quite fine -- |
Oscar Giner
Member #2,207
April 2002
![]() |
23yrold3yrold
Member #1,134
March 2001
![]() |
Why is it in French? I'm going to try Kanzure's suggestion. If that doesn't work, I'm going to try ReyBrujo's suggestion. If that doesn't work, I'm going to say "screw comoputers" and go move to Tibet and be a monk. Quote: Sourceforge - search for "PHP Triad for Windows". Google turned up the SourceForge page easier than SourceForge did. ^_^ Not much info on this thing, is there ... -- |
Mars
Member #971
February 2001
![]() |
Check out some WAMP solution. WAMP is LAMP with Windows instead of Linux. -- |
23yrold3yrold
Member #1,134
March 2001
![]() |
PHP Triad seems to be working. I haven't figured out how to make it load my pages yet ... it really seems to like c:\apache\htdocs. -- |
Kanzure
Member #3,669
July 2003
![]() |
Quote: I haven't figured out how to make it load my pages yet What?? That addy you gave is right for your files.. what's teh problem? |
|
|