Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8290251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:44:55+00:00 2026-06-08T12:44:55+00:00

I am wondering about a certain server setup. Lets say I have a web

  • 0

I am wondering about a certain server setup.

Lets say I have a web server running on my local network, which is accessible using an url such as http://www.example.com from within and also outside the network.

I would like my PHP website to be able to determine if a request comes from within the internal LAN or from the outside. I doubt that this will be possible using the IP address as the request will look as if it is coming from a public IP address, and not the internal one 192.168.x.x. Also the public IP might change from time to time.

Would this be possible, and how could i achieve this in PHP?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:44:57+00:00Added an answer on June 8, 2026 at 12:44 pm

    If your requests comes from inside the lan then the $_SERVER[‘REMOTE_ADDR’] will be from a private ip address group, if if comes from outside the lan it will not.
    Unless you have a poorly configured internal network, but this will probably not be the case.

    look here for the correct address groups
    http://en.wikipedia.org/wiki/Private_network

    If your internal dns server resolves example.com to the public ip then the requests will appear to come from the public ip as well, so if this is the case you also know that the request came from inside.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering how I would go about performing a certain function if a
Just wondering about some practice about this; I have made a simple visual C#
I have been wondering about how people manage their strings if they are likely
I have been wondering about the following lines of code [self performSelector:@selector(myMethod) withObject:self afterDelay:1.0];
I was wondering about how saving variables work by using SharedPreferences inside onStop() function.
Just wondering about how to avoid Magic Strings in Querystrings? I have a lot
I have my authentication on my web app running on the devise gem. I
I'm wondering about standards or commonalities for various common elements on webpages that have
I am wondering about the long term advantages (if any) of layering my web
I'm wondering about this: I have a simple facebook-connect app that will only show

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.