VPS search - whois service and inside look

    Today the service is one year old . The launch occurred a couple of days after the domain registration date, but today's date can be considered the first birthday.

    Whois service


    A new feature has appeared on VPS Search - viewing whois information for a domain. The service supports 529 domain zones (including New gTLD), and for some of them, whois is parsed and the date of registration is determined, the registration date of the domain and registrar is completed, and the DNS server is displayed. Unfortunately, there are a lot of domain zones, and there are few working hands, so the definition of these parameters is currently available only for the most popular zones, but in the very near future the number of such zones will be expanded. Also, in the near future there is a spelling of “Notepad of domains” and “Notepad of servers”.



    VPS Search - Inside Look


    When I see some unusual project, I have an irresistible desire to find out what it is written on, what the admin panel looks like, what servers it uses and other information that is hidden from prying eyes.

    Most often, such a desire remains only a desire, since there is nowhere to go further than viewing the html code of the page. However, today I decided to tell you what VPS Search works on and show screenshots of the admin panel.



    The site is written in php and runs on the phpbb3 forum engine. This engine was chosen for several reasons: firstly, I worked a lot with this system and can write any code with my eyes closed, and secondly, using this engine saved a lot of time, and I did not have to write modules for registering users, password recovery, login, captcha, etc. Well, in the end, the site has a well-functioning forum.

    On the server side, the site runs on a virtual server from DigitalOceanand uses the Debian OS. This service was chosen so that before publishing articles on the Habré it is easy to increase the power of the server and not fall off the Habra effect. Also, the ISPmanager control panel is installed on the server. Requests are handled by nginx and apache. The database server is mysql.

    Of the libraries, jquery and jqueryui are used. This combination made the interface very convenient and functional. For example, sliders and drop-down lists, tooltips, etc. are the merit of the above libraries.



    Some functions of the site work without reloading the page on AJAX. It is very convenient when the user moves the slider or makes a choice in the drop-down menu: after changing the search parameters, the page does not reload, and the user can quickly select the necessary parameters. From the technical side, a POST request is sent to the server and a response is expected in the form of a JSON array. If the response did not include a JSON array, it means that some error occurred on the server, and you need to show a notification about it. In case the JSON array came, then one of the keys of this array will be “Error”. Each time this value is checked, and if it is not equal to zero, an error message is displayed to the user, otherwise this array contains the result of the user’s request (as a rule, part of the template for updating information on the page).

    function PostAction(URL, PostArray, SuccessFunction, ErrorFunction)
    {
    	$.ajax({
    		type: 'POST',
    		url: URL,
    		data: PostArray,
    		success: function(data) {
    			try
    			{	
    				Data = eval('(' + data + ')');
    				if ('Error' in Data)
    				{
    					if (Data['Error'] == 0)
    					{
    						SuccessFunction();
    					}
    					else
    					{
    						ErrorFunction(Data['Error']);
    					}
    				}
    				else
    				{			
    					ErrorFunction('Ошибка связи с сервером');
    				}
    			}
    			catch(error)
    			{
    				ErrorFunction('Ошибка связи с сервером');
    			}
    		},
    		error: function(AjaxRequest, Status)
    		{
    			switch (Status)
    			{
    				case 'timeout':
    				ErrorFunction('Таймаут связи с сервером');
    				break;
    				case 'error':
    				ErrorFunction('Ошибка связи с сервером');
    				break;
    				default:
    				ErrorFunction('Ошибка связи с сервером');
    				break;
    			}
    		}
    	});
    }
    


    Admin


    To be honest, I really do not like to write admin pages for sites. The logic is simple: why write an admin panel when you can edit data via phpmyadmin. At the initial stage, this can still work, but when the project is gaining momentum, the admin panel becomes very necessary. True, some functions in the admin panel are always lacking, since writing them is rather lazy :-)

    I thought for a long time that you can put them on the main page of the admin panel, but, in addition to some statistics and a couple of buttons, I didn’t come up with anything. Although, as practice shows, you practically do not pay attention to these data.



    On the “Companies” page you can find a list of all hosting providers and a button to add a new company. Each hoster can quickly add a tariff to a virtual server, a dedicated server or a discount, as well as edit or delete a company. Also, for those hosters that have affiliate programs, you can see a link to go to billing. To add a company, a lot of time is not necessary, the date of registration of the domain is determined automatically, the screenshot is “pulled up” from a specialized service or it can be downloaded from a file. From routine tasks - search for payment methods on the hosting site and registration in billing to connect affiliate programs. Also, on the hosting page you can find all its tariffs for virtual and dedicated servers and quickly edit them.









    The page with tariffs is completely similar to the lower block of tariffs on the host’s page, therefore I won’t apply a screenshot of this page, but I will tell you more about the page for adding a tariff. This version of the tariff page is already the third in a row, the first two contained a much smaller number of parameters. At the moment, there are a lot of options, and adding tariffs is quite difficult. However, when adding tariffs for one hoster, the “Duplicate" function of the Google Chrome browser helps a lot. Different tariffs quite often have several parameters coinciding. For example, virtualization, country and possible operating systems are most often the same for one tariff group. Therefore, the easiest option to add such tariffs is to fill in the same parameters for all tariffs and duplicate tabs in the browser.





    I won’t tell you about the section with discounts and news, everything is pretty banal, I will show screenshots: Next is the section for Looging Glass points. Initially, I planned to do the Looking Glass service only to be able to check the speed of downloading files from virtual hosters' servers and execute the ping, tracert and mtr commands. Now these points also serve to verify whois to circumvent the limit on the number of requests from one IP address. At any Looking Glass point, you need to specify the address, coordinates, IP addresses and indicate what services this point provides. The domain zone section is the longest of all. To compile such a list, the iana site was sparsen, and the address of its whois server was obtained for each domain.
















    After that, the solution to a complex problem began: for each zone, whois parsing had to be done. The difficulty lies in the fact that whois is different for each zone, so for each zone you need to determine which line is responsible for what. The php strtotime function comes to the rescue, which turns almost any string date into unixtimestamp. It remains only to indicate in which line the registration date and the domain registration end date are written. Unfortunately, the auction section was closed a couple of months after the opening due to low demand, so I will only show a screenshot. That's all! Are you ready to show your admin pages? PS Thank you andorro for the help with the preparation of the text. PPS I thank the hosting company VDSina.ru for supporting the project.













    Also popular now: