whatismyip | Simple PHP Script to return your true external ip | TCP library

 by   dconroy PHP Version: Current License: No License

kandi X-RAY | whatismyip Summary

kandi X-RAY | whatismyip Summary

whatismyip is a PHP library typically used in Networking, TCP applications. whatismyip has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Simple PHP Script to return your true external ip, even works around proxies. This site is currently live at WhatsMyIP.me. The way this script works by analyzing the $_SERVER variable ( an array containing information such as headers, paths, and script locations created by the webserver) and returning the most reliable IP address possible. Please note, the only address you can really trust is REMOTE_ADDR, because it is the source IP of the TCP connection and cant be changed by spoofing/changing an http header. While it is technically possible to bidirectionally spoof IP addresses at the Border Gateway level, but you would have to have control over an ISP to do so.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              whatismyip has a low active ecosystem.
              It has 8 star(s) with 5 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of whatismyip is current.

            kandi-Quality Quality

              whatismyip has no bugs reported.

            kandi-Security Security

              whatismyip has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              whatismyip does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              whatismyip releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of whatismyip
            Get all kandi verified functions for this library.

            whatismyip Key Features

            No Key Features are available at this moment for whatismyip.

            whatismyip Examples and Code Snippets

            No Code Snippets are available at this moment for whatismyip.

            Community Discussions

            QUESTION

            How to list all anonymous (so IP-public) edits made to Wikipedia from a specific IP address?
            Asked 2021-Apr-01 at 10:43

            Lets say I have an IP address, for example the IP address of the Hungarian Parliament: 193.224.28.151

            How can I get a list of all Wikipeida edits made using this IP address?

            On a Tom Scott webpage, I read:

            Here's a fact: Wikipedia stores the IP addresses of anonymous users.

            Here's another fact: all of the web traffic from the Houses of Parliament is sent through one of two proxy servers — which means that every anonymous edit to Wikipedia from within Parliament is attributed to one of just two IP addresses.

            I'm sure you can see where this is going.

            I haven't found a repository for this project. If it can be done either within browser or maybe using Python, that would be great.

            ...

            ANSWER

            Answered 2021-Mar-30 at 19:52

            You can use the Special:Contributions page to view contributions from a Wikipedia account, IP address or IP range. For example, https://en.wikipedia.org/wiki/Special:Contributions/193.224.28.151 lists the edits made from 193.224.28.151. You may also view edits from an IP range, like https://en.wikipedia.org/wiki/Special:Contributions/193.224.28.0/22.

            If you wish to view contributions from Wikipedia accounts and individual IP addresses via Wikipedia's API, documentation and examples are available at https://www.mediawiki.org/wiki/API:Usercontribs

            Source https://stackoverflow.com/questions/66796872

            QUESTION

            C - Get External IP Address
            Asked 2020-Dec-18 at 19:13

            I need to get my public IP address through C/C++ calls. I know as an alternative I can get from external links like "http://whatismyip.akamai.com"

            I wrote a sample to get external IP address. But my program is not returning external IP address. I am getting internal IP address. Am I missing anything here?

            If it is not possible through this way, Can I read DNS and get IP address? OR is there any way I can get external IP address programmatically using C API (Not by reaching some website )?

            ...

            ANSWER

            Answered 2020-Dec-17 at 23:04

            "External IP" is a property of the network; not a property of the computer that is connected to the network. Thus, there is no function that you could call to get such information from the standard library or the operating system, as the system doesn't know the information.

            I wrote a sample to get external IP address.

            You wrote a program that gets the IP address of network interfaces. If the interface is connected to a public network, then the IP is external. If the interface is connected to a private network, then the IP is internal.

            A solution to get the external IP through a private network is to connect to an external service that can see the IP from which the requests comes from. You seem to already know of this.

            A more advanced approach that doesn't require external connections is to run similar service on the router system. As pointed out in a comment, UPnP or more specifically, IGD is such service that a router might provide. There is no standard UPnP client provided by C++ standard nor POSIX.

            Source https://stackoverflow.com/questions/65348174

            QUESTION

            TCP/IP Indy Chat Delphi 10.3.3 FMX (using internet, not only LAN)
            Asked 2020-Nov-26 at 14:09

            I tried making a simple chat system in Delphi 10.3.3 Community Edition using FireMonkey and the Indy components TIdTCPClient and TIdTCPServer.

            It works fine if the Client and Server are located in the same WiFi network (Server = Windows 10 and Client = Android 10). I used the computer's IPv4 address shown in ipconfig to get the computer's IP, and my mobile phone successfully connects.

            But, if I use the internet IP (got it from https://www.whatismyip.com/de/), the client shows the german equivalent to "socket error # 111 connection refused", so what am I missing? I entered the IP in the edit box to connect to - so if the local IP works, why doesn't any other IP work as well?

            Here is the code I used:

            ...

            ANSWER

            Answered 2020-Nov-24 at 17:59

            First off, TIdTCPServer is a multi-threaded component. Its events are fired in the context of worker threads. As such, you must synchronize with the main UI thread when accessing UI controls, like your TMemo. Without that synchronization, bad things can happen, including but not limited to: crashes, deadlocks, corrupting UI controls, making the UI unresponsive to the user, etc.

            That being said, the TIdTCPServer.Bindings collection can bind listening sockets only to local IPs that belong to the PC that TIdTCPServer is running on.

            If the PC is connected directly to the Internet modem, then the modem's public Internet IP is assigned directly to the PC, so TIdTCPServer will be able to bind to the Internet IP.

            However, if the PC is connected to a LAN network instead (via Ethernet or WiFi), then TIdTCPServer cannot bind directly to the Internet IP, only to the PC's LAN IP. As such, you will have to setup port forwarding on the network router (via the router's administration site/app, or through uPNP if enabled) to forward inbound traffic from the router's WAN IP/Port to the Server PC's LAN IP/Port. Then clients can connect to the rouer's Internet IP and be forwarded to TIdTCPServer.

            Source https://stackoverflow.com/questions/64991673

            QUESTION

            Deploying Flask app on own Ubuntu Server Error
            Asked 2020-Jun-14 at 18:59

            GOAL : I am trying to deploy my Flask app to make it public on the web. I have my own server which runs on Ubuntu 18.04

            TUTORIAL : As it is the first time I am doing this, I am following this tutorial. All his steps are perfectly working for me except the last one. However, in this tutorial he used Linode and I use my own server so I directly code on my terminal

            PROBLEM : In his last step after systemctl reload apache2 when I go on the my browser and type my ip address (found using ifconfig) that I put in webApp.conf (192.168.1.25) I get the following error :

            ERROR LOGS : As asked I went into the error.log which outputs the following : You can find the code here : https://pastebin.com/g2rzRUXE

            POTENTIAL PROBLEMS: From what I understand I am having two issues :

            1. Set the 'ServerName' directive globally to suppress this message . So I tried to solve it using this tutorial and I changed my private ip address to my public ip address (found on whatismyip.com) but when doing so I received the following error:

              1. It does not seem to like my prints: . Am I not allowed to keep prints

            Please let me know how I could solve these problems or the other ones in the error log that I might not have seen.

            I hope I was clear enough. If you need any additional info I can edit my question. I am running out of ideas so if you have any tips I would be grateful.

            ...

            ANSWER

            Answered 2020-Jun-14 at 18:59

            In the logs, I can read:

            Source https://stackoverflow.com/questions/62373263

            QUESTION

            Application Insight : Javascript SDK
            Asked 2020-Jun-02 at 01:41

            I have noticed that the user location reported via Application Insight is very unreliable. It is reporting my location in different state, Whereas when using WhatisMyIP it is able to accurately report my location.

            Why such a difference with Application Insight ?

            Here is what Appliction Insight Reports:

            Here is the accurate location reported by WhatIsMyIP

            ...

            ANSWER

            Answered 2020-Jun-02 at 01:41

            Application insights uses the GeoLite2 from MaxMind for IP and geolocation lookup.

            And I tested it at my side by using GeoLite2 and also use WhatIsMyIP, they show me the different locations. So I guess the database for these 2 tools may different and cause this issue.

            Hope it can help you.

            Source https://stackoverflow.com/questions/62118813

            QUESTION

            Java Selenium FirefoxDriver ignores given Proxy settings
            Asked 2020-Apr-27 at 04:21

            I am expecting browser to show Proxy value, but it reveals my actual IP. Any idea why ?

            '''

            ...

            ANSWER

            Answered 2020-Apr-27 at 04:21

            you can use either firefoxprofile or options. add SSL for the proxy which is using by Https. options.addPreference("network.proxy.ssl", "151.253.165.70"); options.addPreference("network.proxy.ssl_port", 8080);

            Source https://stackoverflow.com/questions/61432210

            QUESTION

            How to get the right IP Address
            Asked 2020-Mar-04 at 21:08

            I need to write a shell script for the purpose of unblocking the current ip from a server. The script must run on mac os.

            The script is finished i just need to get the right ip adress, the one i connect to the internet with. If a hit 'ipconfig getifaddr en0' in the console i get the following adress: 127.168.X.XXX. But when I use a service like 'whatismyip.com' im getting 87.188.XXX.XXX. This is the one I need to get in the console.

            Any ideas on which command i could use to get the right ip?

            Thanks on advance.

            ...

            ANSWER

            Answered 2020-Feb-25 at 14:18

            You are tying to find out your external ip address. If you have curl installed on your system, the quickest way is to use:

            Source https://stackoverflow.com/questions/60396635

            QUESTION

            Linux bash script to get own internet IP address
            Asked 2020-Feb-05 at 12:41

            I know I got quite rusty when it comes to bash coding, especially the more elaborate needed trickery handling awk or sed parts.

            I do have a script that logs the IP address currently in use for the interwebs.

            It gets that by either using wget -q0 URL or lynx -dump URL.

            The most easy one was a site that only returned the IP address in plain text and nothing else. Unfortunately that site no longer exists.

            The code was simple as can be: IP=$(wget -qO - http://cfaj.freeshell.org/ipaddr.cgi) But alas! using the code returns nothing cause the site is gone, as lynx can tell us:

            ...

            ANSWER

            Answered 2020-Feb-05 at 12:29

            Not exactly without relying on external services, but you could use dig to reach out to the resolver at opendns.com:

            Source https://stackoverflow.com/questions/60075754

            QUESTION

            Web Scraping w/ Scrapy-Splash -- different results for different proxies?
            Asked 2019-Oct-03 at 21:39

            I have a list of proxy addresses that I am randomly choosing from and feeding into a SplashRequest within a Scrapy spider. To confirm that this was working, I decided to try to scrape the results from What Is My IP?. As proxies were randomly chosen, I noticed three different responses based on the IP:

            1. 502 Bad Gateway
            2. 200 OK where the body says "Sorry, whatismyip.com is not available because it is categorized as security.nettools."
            3. 200 OK with the correct proxy address being returned

            If anyone could explain to me what is going on in #1 and #2 that would be much appreciated!

            Edit

            I have a Splash instance in a Docker container, and I am creating a SplashReqeuest (not a scrapy request) and feeding it a proxy IP chosen at random. For some IPs, I am able to confirm that it is being passed through to the request (see item 3), so that seems to validate this approach -- the random proxy IP is being fed through to the SplashRequest. However, for some of the IPs, I get a 502 Bad Gateway or that weird 200 Ok where "What Is My IP" doesn't return the IP.

            The result are consistent for a given IP address i.e. if address X gives result 1, it always gives result 1.

            ...

            ANSWER

            Answered 2019-Oct-03 at 21:31

            I've only used scrapy-splash a handful of times, but heavily rely on scrapy. My guess is that you're using a splash instance from scrapinghub. I think it's because of the ip that's actually being used to make the request.

            One example I have is trying to scrape google shopping. Google traces the ip back to the origin. So regardless of my ip pool being located in the US. Some ips where tracing back to other countries and returning results for that county. Say we have the below code.

            Source https://stackoverflow.com/questions/58226812

            QUESTION

            How to easily retrieve all or some of my external IP Addresses (on Android device)?
            Asked 2019-Aug-26 at 09:48

            As I understood,
            In order to initialize P2P connectivity via hole-punching, a device should reside in a non-symmetric NAT (which basically also implies single WAN\External IP Address for outgoing traffic).

            I can not find an android app (kind of a little tester app, to open when I'm inside a LAN) that tells what are all or some of my WAN\External IP Addresses.
            All apps on Play that I found show me only one External IP Address, even though I test it from Symmetric NATs with multiple WAN\External Addresses.

            An easy and quick suggestion would be nice (surfing to multiple "whatismyip" sites each time I want to test it is not easy nor elegant\quick).

            ...

            ANSWER

            Answered 2019-Aug-23 at 09:36

            Some DNS servers support dynamic queries that return the sender's public IP, which can be used for this purpose:

            dig -4 +short A myip.opendns.com @resolver1.opendns.com

            dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com

            For a more detailed explanation what it does see How does dig find my WAN-IP-adress? What is “myip.opendns.com” doing?

            Source https://stackoverflow.com/questions/57553934

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install whatismyip

            You can download it from GitHub.
            PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/dconroy/whatismyip.git

          • CLI

            gh repo clone dconroy/whatismyip

          • sshUrl

            git@github.com:dconroy/whatismyip.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular TCP Libraries

            masscan

            by robertdavidgraham

            wait-for-it

            by vishnubob

            gnet

            by panjf2000

            Quasar

            by quasar

            mumble

            by mumble-voip

            Try Top Libraries by dconroy

            PiTranslate

            by dconroyPython

            PropertyChain

            by dconroyJavaScript

            CityKey

            by dconroyJavaScript

            serverless-gas-prices

            by dconroyJavaScript