Skip to main content
Known Participant
August 5, 2008
Answered

Show link based on IP address

  • August 5, 2008
  • 2 replies
  • 364 views
I am adding a laptop checkout function to our helpdesk. People from all over the state go to the helpdesk, but only people in the main two buildings here in town will ever need to check out a laptop, so I was attempting to only show the link that goes to the laptop checkout form based on the client's IP address.

I had found an example of this online about a month ago and copied it and put it to use and believed it was working, however it only seems to be working for certain people inside the IP range I set instead of the entire range. There are two different IP ranges, one for each of the main buildings here, I changed the IP for them in the example code to 11.111.11 and 22.222.22 respectively. Any help in the matter is appreciated.
    This topic has been closed for replies.
    Correct answer Dan_Bracuk
    start with
    AllowedIPRange = "11.111.11,"22.222.22";

    If you don't know how to use the left function, google "coldfusion left()"

    2 replies

    Dan_BracukCorrect answer
    Inspiring
    August 5, 2008
    start with
    AllowedIPRange = "11.111.11,"22.222.22";

    If you don't know how to use the left function, google "coldfusion left()"
    Inspiring
    August 5, 2008
    If all you are doing is trying to match the 1st 3 sections of the IP address, left(9) is a lot simpler than what you are doing.
    rdhelmsAuthor
    Known Participant
    August 5, 2008
    How would you go about doing that?