faqts : Computers : Programming : Languages : PHP : Common Problems : Tips and Tricks

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 13 people (69%) answered Yes
Recently 4 of 4 people (100%) answered Yes

Entry

How can I improve a whois interface for faster client response?

Jun 8th, 1999 07:00
Nathan Wallace, Brian Schaffner


I would first drop the exec() part and just
fsockopen("whois.internic.net", 43) and send the data that way.  Then
you can read the first line - if it has "No match", then close the
connection. Should help you limit the amount of data you need to parse
through.

Second, I would send a header("Connection: keep-alive") as the very
first part of the page. Then, send a flush() after each piece of data
you want displayed.

Remember that Netscape can't display tables until they have been fully
downloaded, so flush won't help if your page is just one big table.