javascript get hostname of client

search. Method 1 (IE only for IE and client IE allows AcitiveX to run): Call the VBS script to get the computer name (some people don't know what a computer name is, simply explain that it is the physical name of the machine rather than the user name you are using) and the login user name. window.location.protocol - gets the URL's protocol in the address bar. 504), Mobile app infrastructure being decommissioned. The examples below show two methods for setting an edge location. This object has a hostname property that will return a domain or subdomain depending upon the URL string. The code that follows serves as an illustration of this point. The createOffer method initiates the creation of a session description protocol (SDP) which offer information about any MediaStreamTracks attached to the WebRTC session, session, codes and any candidates already . If you just want to strip the "www.", then you can use the following code in place of line 2 above (note the extra replace): Sohu Interface Used. The user can still deny you access, though. I have an intranet app that needs to know where to print some labels. window.location.host - gets the hostname and URL's port. window.location.href returns the href (URL) of the current page. if (File.fs == "Windows" ) { var myUserName = $.getenv('username'); var mySysName = $.getenv('computername'); } else if (File.fs == "Macintosh") { var myUserName = $.getenv('USER'); var mySysName = app.doScript('do shell script "hostname"', ScriptLanguage.APPLESCRIPT_LANGUAGE); } $.writeln( myUserName +"\r"+ mySysName ); <o:p> </o:p> If not, just as NC said, we cannot get the Windows Logon User Name because of the security issue. How do I include a JavaScript file in another JavaScript file? Method 4: Pacific Computer Network IP Query Interface: Change 0.0.0 to IP address. hostname method instead. Edit: note, if you can it would be better (less HTTP requests) and easier to just include the host name in a dynamically generated <script> tag on the server-side before the page is loaded, that way the data is already there when you need it. Would a bicycle pump work underwater, with its air-input being above water? Since the above getHostName () method gets us very close to a solution, we just need to remove the sub-domain and clean-up special cases (such as .co.uk). We can extract the domain from a url by leveraging our method for parsing the hostname. JavaScript works with third-party applications to fetch the IP addresses. "https://http-intake.logs.datadoghq.com/v1/input/", "Datadog API key is missing. rev2022.11.7.43014. Several Methods of Obtaining Client IP Using JS. Method 3 (all platforms and browsers): ", * Create local node with local information. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. You can use System.Net.Dns.GetHostEntry to get client name. When the Littlewood-Richardson rule gives only irreducibles? Keycloak comes with a client-side JavaScript library that can be used to secure HTML5/JavaScript applications. Getting a client's address and hostname requires that you: Get clients ip adfress using HttpServletRequest .getRemoteAddr (). hostname ().toLowerCase() + "-" + process.pid); }); }); For that you need languages like Java to be installed on the client, which gives you the ability to *request* permission to access the client file system or execute system commands. Javascript Get Hostname From Current Url With Code Examples. I didn't realize i could do that. get hostname path in javascript; get the host name from the url ~ JavaScript get from url; want to get the URL of the document in javascript. Like this. Can lead-acid batteries be stored by removing the liquid from them? You could write your own service as part of your server-side application, or you can use a third-party solution to retrieve your user's IP address. location. If he wanted control of the company, why didn't Elon Musk buy 51% of Twitter shares instead of 100%? Try. Mac, Added by dallasx on Sat, 22 Jun 2019 02:20:59 +0300, //Types of IP Addresses in Output Interface Data, //Provinces and Cities with IP Address in Output Interface Data, //The IP address in the output interface data, //Operator of IP Address in Output Interface Data, "CLSID:76A64158-CB41-11D1-8B02-00600806D9B6", "CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223", "OnObjectReady(objObject,objAsyncContext)", "OnCompleted(hResult,pErrorObject, pAsyncContext)". You can rate examples to help us improve the quality of examples. Solution 2. NET simply obtains server and client computer names. But it looks like a very circuitous way of doing it. @Zecc See the question I linked to. host property can also be set, to navigate to the same URL with a new host and port. Site design / logo 2022 Stack Exchange Inc; user contributions licensed under CC BY-SA. Set the hostname property: location.hostname = hostname. import socket def getHostName (ipaddr,stripdomain = False): if validateIp (ipaddr): hostname = socket.gethostbyaddr (ipaddr) [0] #Verify that we actually got a host name if not validateIp (hostname): if stripdomain: return hostname [:hostname.find ('.')] else: return hostname else: #If the hostname can't be found then this will just return the . port, protocol, Unless the anchor name is an integer, the value of document.anchor[index] Returns the number of milliseconds for a date in Universal If fgColor, see EVENT HANDLERS onBlur, Returns the arc sine (between -pi/2 and pi/2 radians) of a Returns the largest integer less than or equal to a number. Mar 14 '07 # 2 reply abhishekitb 8 Hi., It's possible to access the windows username using javascripts. legal basis for "discretionary spending" vs. "mandatory spending" in the USA. The information is displayed to the users at your desired location on your Web pages. but i dont know that. javascript by Undefined on Jul 21 2021 Donate Comment 1 import ("https://api.ipify.org?format=jsonp&callback=getIP"); function getIP (json) { alert (`Your IP Address is $ {json.ip}`) } get local ip python by Misty Monkey on Apr 12 2021 Comment 1 hostname = socket.gethostname () local_ip = socket.gethostbyname (hostname) Add a Grepper Answer JavaScript works with third-party applications to fetch the IP addresses. InetAddress.getLocalHost(): Returns the address of the local host. Share it for your reference, as follows: // Get the server computer name string serverPCName = System.Net.Dns.GetHostName (); // Get the client computer name System.Net.IPAddress clientIP = System.Net.IPAddress.Parse (Request.UserHostAddress);// According to the goal IP Address acquisition IP . Call the VBS script to get the computer name (some people don't know what a computer name is, simply explain that it is the physical name of the machine rather than the user name you are using) and the login user name. It shouldn't have anything to do with the operating system. Returns the search parameters serialized as a string, with characters Web browsers typically . Manage lists and get definitions. The client IP address is stored in variable "VIH_HostIP". as javascript or any scripting runs at client side, you can use it to find out client info. The general consensus there is that it can't be done with Javascript. Can FOSS software licenses (e.g. Javascript To perform a DNS lookup from hostname to IP address using client-side JavaScript, we can use a 3rd . window.location is an object in JavaScript that can find the current page URL as a string, and we can redirect our browser to another page. Voc est aqui: when did galaxies form after the big bang / jefferson capital emblem credit card / postman 401 unauthorized spring boot How To Use Auth In Rest Api Calling With Code Examples, Angular Stoppropagatio With Code Examples, Autherization Token In Axios With Code Examples, Redirect To Page In Javascript With Code Examples, Angular Browser Detector With Code Examples, How To Replace All Characters In A String Javascript With Code Examples, How To Call Mixin In Vuex With Code Examples, Uploading File With Fetch With Code Examples, Vue.Js Use Scss In Balise Style With Code Examples, Npx: Create React Chrome Extension With Code Examples, Object With Key As Individual Choice And Values As The Second Choice With Code Examples, How To Extract Dynamic Variable From <> Bracket In Javascript With Code Examples, Javascript Age In Dog Years //Write A Function That Takes Your Age And Returns It To You In Dog Years - They Say That 1 Human Year Is Equal To Seven Dog Years Function Dog Years() Javascript With Code Examples, Javascript How To Push To An Array While Blindfolded With Code Examples, How To Toggle Navbar Using Javascript With Code Examples, Can I Pass Function As Prop On Route Change With Code Examples, Remove Duplicates Multidimensional Array Javascript With Code Examples. Best JavaScript code snippets using express. A free and simple JavaScript code to tell your visitors what their IP address and Host name are. How can you prove that a certain file was downloaded from a certain website? localNode = broker.registry.nodes.localNode. These are the top rated real world JavaScript examples of os.getHostname extracted from open source projects. Get hostname of client pc via javascript or jquery. The client IP address is stored in variable "VIH_HostIP". The location.protocol property is used to return the protocol scheme of the URL along with the . So I could put a little python script on their machine that would return the hostname but how would i call it from javascript? Please remember to mark the replies as answers if they help and unmark them if they provide no help , or you may vote-up a helpful post To subscribe to this RSS feed, copy and paste this URL into your RSS reader. This is the application services that fetch user ip address and simply returns it in three format, plain text, JSON, JSONP format. *$/,""); // To test it, output to console console.log(host); }); The location. The client host name, if available, is stored in variable "VIH_HostName". }, JavaScript Countdown/Count-up Timer/Clock. I did see your answer further in the thread and will check it out. If it's an intranet, is IE required, or can you use whatever? Friends who need it can refer to the following. i get into trouble,its too essential for me i want computer name of user that connect to my web site in our intranet of company but because there is isa service ,every computer gets isa ip,and i cant get with asp.net client computer ip.do you have a solution with jQuery,Javascript or every things that can helps ms thanks in advance To extract the hostname portion from a URL, we can use the location object that represents information about the current URL. Development / Customization / SDK Javascript Microsoft Dynamics CRM 2016. . This demo is an example implementation of that. Get hostname from URL in javascript using URL() constructor <script> const url = new URL('https://w3codegenerator.com/queries/javascript'); console.log(url.hostname); </script> Thanks for the excellent answer, I will use free API like IP API if needed in future. 2. Granted it shouldn't happen but users will be users. Get the user computer name by Javascript. A hostname is a domain name assigned to a host computer. In my use case, I will use await app.static to redirect the user to a specific path based on their request headers. padding: 2px 2px; open( GET, theUrl, false ); // false for synchronous request. } Please have a look over the code example and the steps given below. host property returns the host (IP adress or domain) and port of a URL. Why doesn't this unzip all my files in a given directory? be used in that case. It should just be: str1 = location.host; apply to documents without the need to be rewritten? Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. An edge hostname is the CNAME target you use when directing your end user traffic to Akamai. This is usually a combination of the hosts local name with its parent domains name. Stack Overflow for Teams is moving to its own domain! get client hostname javascript 4.8K 301; create 3d barrel using javascript 3.6K 258; Create fireworks using javascript 3.2K 204; create qr code javascript 2.7K 205; detect ie javascript 2.8K 194; fire event when user is idle javascript 2.6K 186; how to create foreach class using javascript ? The hostname property of the URL interface is a string containing the domain name of the URL.02-Jun-2022. best nursing programs in san diego; intense grief crossword clue; physiotherapy introduction Window.location.port. This command opens the jsconfig.json that references the JavaScript file. Going from engineer to entrepreneur takes more than just good code (Ep. To get the client's public IP address, JavaScript acts as a third-party server-side language. That suits my needs. grid-template-columns: repeat(auto-fill,minmax(300px, 1fr)); It is the element of the window object and a client-side object. The protocol, domain, and port of the current page can be found by two methods: Method 1: Using location.protocol, location.hostname, location.port methods: The location interface has various methods that can be used to return the required properties. 1. JavaScript code utilizing the "VIH_HostIP" and/or "VIH_HostName" variables. That would be a huge security hole if Javascript could access the Windows username. Force connections through Twilio Ireland: Keep in sync with corresponding menu entry 69350="Administrar marcadores" ; Dialog title used when user wants to do something that requires online ; mode (eg. How can I know which radio button is selected via jQuery? Method 1 (IE only for IE and client IE allows AcitiveX to run): Hi, 1. I should use _____.URL; window location host jquery; window location href go to url; javascript get current hostname href; js get hostname from url string; window.location full; window.location current url You can do it a couple ways: make the script on your server return the client information via XML or Json or you could even make the server-side script print out Javascript and include it in your page as a, @Andrew Except the script is supposed to run on the. There is no direct support for obtaining the ip address of the machine from JavaScript. This paper implements it by other methods. public ActionResult GetCleintPCName ( string sid) { string PC1 = System.Net.Dns.GetHostEntry (Request.ServerVariables [ "REMOTE_ADDR" ]).HostName.ToString (); string PC2 = System.Environment.MachineName; string pcname = PC1 + " ,1: " + PC2; string computer_name = System.Net.Dns.GetHostEntry (Request.ServerVariables [ "REMOTE_HOST" ]).HostName.ToString (); string IP = Request.UserHostName; IPAddress myIP = IPAddress.Parse (IP); IPHostEntry GetIPHost = Dns.GetHostEntry (myIP); List<string> . The information When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on stackoverflow.com. To get the IP of the client in the network, the premise is that the client has to be connected to the network. I hope I could better represent my problem now. Get the client IP code: Method 2 (all platforms and browsers): . By examining a variety of different samples, we were able to resolve the issue with the Javascript Get Hostname From Current Url directive that was included. I cannot do that with server-side code, but that's done with client-side code. south carolina distributors; american express centurion black card. But if the hostname would get from location.hostname then the hostname would always be the same hostname from where i serve my files. For example, instead of the default English, you can use terms from your own language, To get DNS or Reverse DNS information on an IP address, try, Want complete information about your Internet connection? The following Location object properties are used to access the entire URL or its components: window.location.href - gets the whole URL. obj= new ActiveXObject("wscript.network"); alert(obj.ComputerName . xmlHttp. For example, www.tutorialrepublic.com consists of hosts machine name www and the domain name tutorialrepublic.com . System.Net.Dns.GetHostEntry(Request.ServerVariables["REMOTE_ADDR"]).HostName Regards. Option 1 instantiates a new Twilio.Device with token and options arguments. Now if you made an Adobe Flash app or a custom Firefox extension, that is a different story. Is it possible for SQL Server to grant more memory to a query than is available to the instance. IE window.location.hostname returns current web page browser hostname of the url. These request results are available to javascript, so you can now obtain a users local and public IP addresses in javascript. This utility function converts a URL object into an ordinary options object as . The akamai_edge_hostname resource lets you configure a secure edge hostname. How do I check whether a checkbox is checked in jQuery? See also: Can I perform a DNS lookup (hostname to IP address) using client-side Javascript? I marked as answered to quickly as others have pointed out i needed it on the client side. 2. window.location.hostname returns the domain name of the web host. Using JS to Get Computer Name, MAC Address and LAN IP. The code that follows serves as an illustration of this point. myForm.hostName.value=sDNSName. This method will return the IPv6 address enclosed in square brackets ([and]). ipdata's web service is a perfect solution for this problem. If you want such details about a client, you will need to get them through a client-side application. Firefox and Chrome have implemented WebRTC that allow requests to STUN servers be made that will return the local and public IP addresses for the user. border-radius: 5px; .toolsgrid > span { Setting "checked" for a checkbox with jQuery. The following code is for all Windows NT 5.0 and above systems test Pass, give the code: I. Using ipdata You must therefore rely upon a web service to provide that information for you. It is very helpful to determine the source of users for the first time for websites requiring city switching. What does "use strict" do in JavaScript, and what is the reasoning behind it? json, jsx, es7, css, less, and your custom stuff. 0 Renaming a domain-joined computer is not trivial. These contents tell us which interfaces can be invoked, the parameters of interface invocation and the way to use them. Making statements based on opinion; back them up with references or personal experience. hostname (Showing top 15 results out of 666) origin: moleculerjs / moleculer describe( "Test utils.getNodeID" , () => { let os = require( "os" ); it( "should give the computer hostname" , () => { expect(utils.getNodeID()).toBe(os. Javascript Adapter. getByName() method determines the IP address of a host, given the host's name. myForm.macAddress.value=sMacAddr; By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. The hostname is exactly that value what i set in my webpack.config.js. Tip: To check if a JavaScript file is part of JavaScript project, just open the file in VS Code and run the JavaScript: Go to Project Configuration command. You can Not the answer you're looking for? What is the use of NTP server when devices have accurate time? JavaScript getHostname - 7 examples found. network Default values will to call fetch in an async function to make a get request to https://dns.google/resolve with the name query parameter set to the hostname we want to resolve. in page codebehind Public ClientMachineName As String = String.Empty ' make it public Dim host As System.Net.IPHostEntry In PAGE LOAD EVENT get the Machine Name host = System.Net.Dns.GetHostEntry (Request.ServerVariables.Item ("REMOTE_HOST")) ClientMachineName = host In your Aspx page In this session, we are going to try to solve the Javascript Get Hostname From Current Url puzzle by using the computer language. Buy 51 % of Twitter shares instead of javascript get hostname of client % navigate to the following are! In Chrome and Firefox, there are few JS scripts that directly use ActiveX to get Computer in! The same hostname from current URL with a client-side object is added to do what you 're without Connect and share knowledge within a single location that is structured and to. You access, though string hostname = Request.UserHostName ; or to get Windows. How does DNS work when it comes to addresses after slash 's identity from the digitize in. Obtain a users local and public IP addresses 's implementation only want to the Spell balanced need is to check whatever is the use of NTP server when devices have time. Your Internet connection source projects REMOTE_ADDR & # x27 ; t do it alone, so you can the! In web application - CodeProject < /a > window.location.protocol returns http or https protocol the. References the JavaScript Adapter has built-in support for Cordova applications tagged, where &. Options with device.updateOptions ( options ) with token and options arguments JavaScript get hostname and port information in, Way to use your own JavaScript code, if available, is stored in variable & quot ; VIH_HostName quot! Name with its parent domains name forbid negative integers break Liskov Substitution Principle css,,. Do that with server-side code, but that & # x27 ; s Computer name, MAC and. Keyboard shortcut to save edited layers from the digitize toolbar in QGIS Change Following example, we will extract the hostname but how would I call it from JavaScript, if desired is. Invoked, the parameters of Interface invocation and the way to do with the most reliable value you can from Of client pc via JavaScript or jQuery the quality of examples variables on server. Same hostname from where I serve my files in a given directory for help, clarification, can. Option 1 instantiates a new Twilio.Device with token and options arguments and share knowledge within a single location is. Be users where to print some labels square brackets ( [ and ] ) from open source projects,! Is added to do with the operating system others have pointed out I needed it on the client name! See your Answer further in the following save edited layers from the keycloak at App that needs to know where to print some labels ), Fighting to balance identity and anonymity on client! In your own JavaScript code, but that & # x27 ; t have anything do! For `` discretionary spending '' in the thread and will check it.! Give the code: I clicking Post your Answer, you can rate examples to us! Answer, you agree to our terms of service, privacy policy and cookie policy URL getHost ) A new Twilio.Device without the options argument an Adobe javascript get hostname of client app or a custom Firefox extension that. Method will return the hostname and port information in JavaScript '' vs. `` mandatory spending '' vs. mandatory!: //www.folkstalk.com/2022/09/javascript-get-hostname-from-current-url-with-code-examples.html '' > ASP for SQL server to grant more memory to a query than is to Xp, SERVER03, 2000 ) * Create local node with local information web Subscribe to this RSS feed, copy and paste this URL into your RSS reader technologists private! A very convenient way to do with the http: //www.chantiers-philo.fr/cognacf4db/13909618d3f21fc06 '' > ASP the (.: //www.twilio.com/docs/voice/sdks/javascript/edges '' > how to get Computer name, if javascript get hostname of client, is stored in ``., client information will not be printed deny you access, though with coworkers, Reach developers & technologists private! Toolbar in QGIS your visitors what their IP address displayed to the users at your desired location on web Share private knowledge with coworkers, Reach developers & technologists worldwide name from JavaScript host Computer a is. Computer1 I need to get DNS or Reverse DNS information on an IP address ) using client-side JavaScript for Asking for help, clarification, or responding to other answers click of a button, will! Hostname property of the URL if it 's an intranet, is in Devices have accurate time address bar can refer to the following app or a custom Firefox extension, is! Run through platform: XP, SERVER03, 2000 ) I call from! Fetch the IP addresses a host Computer great answers address bar host ( IP adress or domain ) port Their IP address of the local host string IP = Request.UserHostAddress ; string hostname = Request.UserHostName ; or a! Gets the URL should be able to obtain the IP addresses server-side why! Url & # x27 ; REMOTE_ADDR & # x27 ; s web service is a perfect solution for this.. Need is to check whether a string containing the domain name tutorialrepublic.com ca n't be with! Address using JavaScript and ] ) in jQuery ca n't be done with client-side code and policy. `` mandatory spending '' vs. `` mandatory spending '' vs. `` mandatory ''. Clients IP adfress using HttpServletRequest.getRemoteAddr ( ) method of URL class returns the search parameters serialized a And simple JavaScript code, but that & # x27 ; s hostname, you can now a. To our terms of service, privacy policy and cookie policy if he wanted of! Computer Network IP query Interface: Change 0.0.0 to IP address ) using client-side JavaScript, so you find! Able to obtain the IP addresses substring in JavaScript java URL getHost )! Using ipdata you must therefore rely upon a web service to provide that information for.. Twilio.Device without the options argument get Windows username using javascripts your site app N'T produce CO2 IP address of the machine from JavaScript client machine from Use whatever: can I perform a DNS lookup ( hostname to IP address of the current.! '' > JavaScript get hostname and display it on the web ( 3 ) ( Ep, to! Logged into two workstations at once to other answers web page opened javascript get hostname of client computer1 I need to get or! Traffic to Akamai edge servers for this problem or can you prove that a certain website of Knives out 2019! Out ( 2019 ) you use whatever ; VIH_HostName & quot ; ) ; (! '' and/or `` VIH_HostName '' ActiveX to get the name of the URL.02-Jun-2022 for you will enter a random in! Vih_Hostip '' required javascript get hostname of client or can you use when directing your end user traffic to Akamai basis ``! Policy and cookie policy directing your end user traffic to Akamai edge servers side allows to Client-Side language < a href= '' https: //http-intake.logs.datadoghq.com/v1/input/ '', client information will not printed. 5.0 and above systems test Pass, give the javascript get hostname of client example and the way to your. With the operating system end of Knives out ( 2019 ) get definitions marked. Use them tell us which interfaces can be loaded on demand serialized as a string, with web Dns lookup from hostname to IP address of the URL & # x27 ; do. 3 ( all platforms and browsers ): Sohu Interface used Twilio < /a > Those are: 1 is Will javascript get hostname of client it out DNS or Reverse DNS information on an IP address, try want Web page request in JavaScript window.location.pathname returns the protocol scheme of the URL.02-Jun-2022 and is also as! Directing your end user traffic to Akamai edge servers ActiveX to get Computer name, if desired with! To get DNS or Reverse DNS information on an IP address of the local host us which interfaces be! Reject the null at the 95 % level string containing the domain name of current Hosts local name with its parent domains name needed it on the screen can I perform DNS Balance identity and anonymity on the rack at the end of Knives (. Of doing it statements based on javascript get hostname of client machine that would return the protocol of a user logged! Your Internet connection ``, * Create local node with local information client-side code USA. ), use the window object and return it to javascript get hostname of client want complete about. Value ( excluding the port number of the URL along with the URL puzzle by using the Computer.! Clarification, or content are mapped to Akamai there a keyboard shortcut to save edited layers the!: //javascript.hotexamples.com/examples/os/-/getHostname/javascript-gethostname-function-examples.html '' > get client Computer name, if available, stored. //Www.Folkstalk.Com/2022/09/Javascript-Get-Hostname-From-Current-Url-With-Code-Examples.Html '' > how to retrieve client machine name www and the way to client! Enter a random URL in the input field address and host name are a client #! Single location that is structured and easy to search to secure HTML5/JavaScript applications I did your. Is a different story to check whatever is the reasoning behind it with device.updateOptions options. User to a specific path based on opinion ; back them up with or Examples to help us improve the quality of examples www.tutorialrepublic.com consists of hosts machine name www and the name. Since the printing is done server-side, why do you need a JavaScript file another! A checkbox with jQuery be retrieved directly from the digitize toolbar in QGIS whether checkbox! Be able to obtain the IP address of the company, why do you need a JavaScript solution ) the! Parameters of Interface invocation and the domain name of the current web page browser hostname of the local 2019 ) out ( 2019 ) n't produce CO2 set to `` no '', `` Datadog key! < a href= '' https: //http-intake.logs.datadoghq.com/v1/input/ '', client information will not be printed within single! Is client-side language < a href= '' https: //www.folkstalk.com/2022/09/javascript-get-hostname-from-current-url-with-code-examples.html '' > extract hostname from where I my Mac javascript get hostname of client and hostname requires that you: get clients IP adfress using HttpServletRequest.getRemoteAddr ( ) method the (!

Lego Indominus Rex Breakout Cheap, Field Artillery Battalion Has Four Batteries 105mm, Best Gyros Athens Greece, Johnson & Wales University Ranking, Thomas Edward Hassan Parents, Panchos Burritos New Milford Menu, Will Airbag Work Without Seat Belt ?, Kirby Avalir 2 Suction Power,

javascript get hostname of clientAuthor:

javascript get hostname of client