• 1 reply
  • Latest Post - ‏2014-09-20T11:40:56Z by jitupkp
1 Post

Pinned topic How to use AJAX for getting information from multiple servers?

‏2012-02-27T11:37:08Z |
I have created a simple php script that searches through several whois servers (.com, .net, .info etc.) for the availability of a domain name.
Additionally, I made the script look also for different other domain names by adding prefixes and suffixes to the search term. (E.g. if you look for the domain name, the script also looks for and

I have a list of 20 prefixes and 20 suffixes that the script is looking for at the moment, summing up more than 120 requests to the whois servers.

My problem is that the browser waits for all the script to finish until displaying the full result. This might take a while (depending on the whois server charge) and it's not very nice for the user.

What I would like, is to show the results one by one as received from the whois servers. For this I have tried to use flush() and ob_flush() PHP functions in different manners, but with no result.

Recently I learned that only AJAX would solve my issue. I have read some tutorials, but I have no idea how to apply it in my special case.

Could anyone here give me some hints?

Thank you.