I created a website with PHP and JS. I want to send my IP address to a friend who is in another state and let him see it. My site is loaded by xampp. How could I do this?
This may get complicated depending on your ISP. If your ISP hasn't blocked port 80 then it is as simple as making sure that your router forwards all requests on port 80 to your computers internal ip, then just going to whatsmyip.org then having him type in http:// followed by your IP address, then of course followed by the subdirectory of XAMPP.
Also, remember that depending on your ISP your IP may change so he will want to view it fairly fast. If your ISP does not allow port forwarding it becomes quite a bit more complicated and I would suggest just finding a free host and having him look at that.
Verizon lets you log in (on recent routers) at
You'll have to specify which device to forward the ports of. Open a terminal on your Mac, and type
If you decide to go with free hosting, some options include X10Hosting (gives most control) or 000webhost (almost as good, I've used both). If at any point you decide you need more, I strongly encourage Cloud Hosting, as it costs the same or less as paid versions of the aforementioned hosts and gives you about 20x the performance per dollar spent (based on my benchmarks of Bluehost vs Digital Ocean).