hostname

Zend Route with subdomain yahoo like.

Hi, I would like to use Zend Route to treat URI like, http:/US.video.yahoo.com and also http://video.yahoo.com with the same route. For the second proposition i would like that the system tell me that the country that was to "US" in the first one, is now at NULL. But i don't arrive to have Zend Route Hostname doing regex like stuffs. H...

key value routing in Zend Framework Route

Hello, I'm using a Hostname route to capture a subdomain and use as a category. I then chain a Router route for the controller, action and key/value pairs. $hostnameRoute = new Zend_Controller_Router_Route_Hostname( ':customer.ddc.:domain', array( 'customer' => ':customer' ) ); $routerRoute = new Zend_Controller_Router_Route( ':c...

AppleScript or Web Page to update Host Name?

I have never written anything in AppleScript, either by hand or with Automator, so I'm trying to decide whether my overall goal justifies the time and effort spent on making a script... Basically, I manage the LAN in my complex, and there are 20-40 residents. About half are Mac users, and I've noticted that it is fairly consistent that ...

Get host name without using HttpRequest

I'm want to run a "background job" in my ASP.NET application (periodically, as separate thread). And I need host name (DNS name or IP) to do my tasks. The problem - HttpContext.Current may be not available here (it's NULL). Is there any way to get a host name in not using HttpContext.Current.Request.Url.Host. ...

Get hostname from Rails controller

I am trying to get the hostname of the machine which a rails application is running on from the controller. What would be the best way to do this taking into account it should work on both windows and linux? ...

PHP5 - Fails to resolve hostnames when not in interactive mode.

I'm working with an OS X 10.6 Server running Apache2 / PHP5 and having a problem with PHP not resolving hostnames when 'fopen()' tries to retrieve a file from a remote server. When run in interactive mode on the command line 'fopen()' works perfectly. However, when run through the web it will always fail with the error: failed to open s...

Is it possible to resolve a hostname from an IP address without DNS?

Assuming you have an IP address and no other information. You're not allowed to use DNS as it may be reporting invalid information. Also assume that the destination machine is running a Microsoft OS and is currently online and booted. Is there any way to query the machine directly using the IP address (some service/port) to find out...

How can one change a Windows 2000 computer name in .NET 2.0?

I'm trying to change a computer's name (host name) on Windows 2000 using .NET 2.0. The computer is not joined to a domain. Windows XP and higher provides the WMI method Win32_ComputerSystem.Rename, but this is not available in Windows 2000 (reference here). I'm not averse to just calling an external program if I need to, but I also ca...

Resolve Hostname Error When Accessing Subversion

I get the an error when attempting to do the following commands in Subversion: update, commit, log, list, blame etc. However, diff and info work. The error is the following when using any desktop client, e.g. CollabNet, TortoiseSVN, Intellij, Visual Studio's AnkhSVN: "http://xxx01/comm/JavaService/trunk/: Could not resolve hostname `h...

Java: Common way to validate and convert "host:port" to InetSocketAddress?

Hello, everyone! What is the common way in Java to validate and convert a string of the form host:port into an instance of InetSocketAddress? It would be nice if following criteria were met: No address lookups; Working for IPv4, IPv6, and "string" hostnames; (For IPv4 it's ip:port, for IPv6 it's [ip]:port, right? Is there some RFC wh...

Reconfigure publishing and distribution in SQL Server for changed Hostname

I have SQL Server 2005 running on a development machine that is administered by people rather far away, metaphorically speaking. They decided it would be fun to change the Network Name/Computer Name/Hostname in command prompt of this machine from "OldName" to "NewName". SQL Server was installed and distribution and publishing set up un...

Why this hostname looks so strange?

I use DNSSD.resolve() method to get information about a service found by Bonjour. I was able to get the port of the found service as well as its hostname. However, the hostname looks not as I expected. I thought it will be an IP address but it is equal to ID00926.local.. What is that? Can I use it as an IP address to create sockets in Ja...

validate hostname string in Python

Following up to Regular expression to match hostname or IP Address? and using Restrictions on valid host names as a reference, what is the most readable, concise way to match/validate a hostname/fqdn (fully qualified domain name) in Python? I've answered with my attempt below, improvements welcome. ...

What is the port for a hostname query ?

I want to query an IP to get its hostname. What is the standard port for this ? Could it be port 101 listed under "hostnames" in /etc/services ? ...

Python lookup hostname from IP with 1 second timeout

How can I look up a hostname given an IP address? Furthermore, how can I specify a timeout in case no such reverse DNS entry exists? Trying to keep things as fast as possible. Or is there a better way? Thank you! ...

getnameinfo prototype asks for sockaddr not sockaddr_in ?

The getnameinfo prototype asks for sockaddr but I have only seen examples using sockaddr_in. Can this example be re-written for sockaddr ? sin_family becomes sa_family but what about sin_port and sin_addr ? How are they included in sa_data ? struct sockaddr{ unsigned short sa_family; char sa_data[14]; }; struct soc...

How do I get the server hostname from a mounted directory with cocoa/obj-c?

Currently when I open a file with my program I can select files on a server by clicking on the server name in the sidebar in an NSOpenPanel and then selecting the file. No problem, this works fine for using the file as long as the shared directory is mounted. I get a path like "/Volumes/SHARENAME/filename.bla". My question is how do...

How can I get a the host name (with port) that a servlet is at.

I thought ServletContext might provide a method. Does the getAttribute() method of ServletContext provide any help i.e. is there an attribute name (maybe "host", "port") that will be of help. The reason for this is I want my application to run wherever it is deployed, and at one point I have to allow a user to click a link that points t...

How can I create and manage a multi-tenant ASP MVC application

Hi, I want to create a multi-tenant application that uses the hostname to determine the customer. For example: CustomerOne.myapp.com AnotherCo.myapp.com AndOneMore.myapp.com ... I can do the database and security side with no problems, I can also get the hostname from the URL, but what I am struggling to find out is how to create the...

Knowing if a script is called from an iframe on another host in PHP (hopefuly without Javascript)

I want to identify if a PHP script is being called inside an iframe of a different host. I could resort to using Javascript for that, but I'd like to find a JS-free solution first. Right now I'm using this logic: If $_SERVER['HTTP_HOST'] is not equal to the host name of $_SERVER['HTTP_REFERER'] And $_SERVER['REDIRECT_STATUS'] is de...