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?

2 Answers 2


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.

  • I have verizon FiOS and I found out that port 80 is blocked. what should I do?
    – Coder404
    Commented Aug 2, 2012 at 20:17
  • @Coder404 You can either get a free website. Or you can try having your router accept incoming connections from something like port 6000 and forward them to 80. Then you just have to tell your friend to use yourip:6000 where yourip is your ip address then after 6000 append the path to the file. Commented Aug 2, 2012 at 20:33
  • 1. What is a free website? Are people actually giving away domain names? 2.How could I make my router accept port 6000?
    – Coder404
    Commented Aug 2, 2012 at 21:15
  • You can use a .tk domain at dot.tk if you have it. People give out hosting. Some give out free subdomains too. 000webhost.com give free PHP hosting. Port forwarding I can't really help with as it depends on the router brand and model. You can usually login to it at either or Commented Aug 2, 2012 at 21:34

Verizon lets you log in (on recent routers) at If you don't have the password, hold the reset button on the back of your router for 30 seconds or more (not 29! it's picky). The settings for open ports are considered advanced, I recommend watching this video, as it shows the process well. Simply open the port 80, or select the web server/HTTP option from the list.

You'll have to specify which device to forward the ports of. Open a terminal on your Mac, and type ifconfig | grep '192\.168'. You'll likely see with perhaps a different ending number instead of 3. This is the router's name for your computer on the local network, and which device you should use on the port settings page.

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.