• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Getting server IP

Explorer ,
Oct 14, 2006 Oct 14, 2006

Copy link to clipboard

Copied


Is their any way to get the server IP where an applications is running. Easy to get remote IP but server one ??? The idea is to create some kind of serialization to prevent the application to run from an unauthorised location.

Many thanks for any information you can provide.
TOPICS
Advanced techniques

Views

233

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 14, 2006 Oct 14, 2006

Copy link to clipboard

Copied

Remember that the machine may have more than one IP (especially servers).

The attached gets all of them.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 15, 2006 Oct 15, 2006

Copy link to clipboard

Copied

This is greate, it kind of work but how do I manipulate this information.

This is the error code I am getting trying to evaluate the IP result with a conditional value:
Complex object types cannot be converted to simple values.

The expression has requested a variable or an intermediate expression result as a simple value, however, the result cannot be converted to a simple value. Simple values are strings, numbers, boolean values, and date/time values. Queries, arrays, and COM objects are examples of complex values.
The most likely cause of the error is that you are trying to use a complex value as a simple one. For example, you might be trying to use a query variable in a <CFIF> tag. This was possible in ColdFusion 2.0 but creates an error in later versions.

<cfif IsDefined ("aHostIPs") and aHostIPs EQ "myLookingIP"> Test passed </cfif>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Oct 15, 2006 Oct 15, 2006

Copy link to clipboard

Copied

LATEST
You would use:
<CFIF ListFind (ArrayToList (aHostIPs), "myLookingIP")>
<h1>Test passed</h1>
</CFIF>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation