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

Show link based on IP address

New Here ,
Aug 05, 2008 Aug 05, 2008
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.
326
Translate
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

correct answers 1 Correct answer

LEGEND , Aug 05, 2008 Aug 05, 2008
start with
AllowedIPRange = "11.111.11,"22.222.22";

If you don't know how to use the left function, google "coldfusion left()"
Translate
LEGEND ,
Aug 05, 2008 Aug 05, 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.
Translate
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
New Here ,
Aug 05, 2008 Aug 05, 2008
How would you go about doing that?
Translate
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
LEGEND ,
Aug 05, 2008 Aug 05, 2008
LATEST
start with
AllowedIPRange = "11.111.11,"22.222.22";

If you don't know how to use the left function, google "coldfusion left()"
Translate
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