Jump to content

Using php in a similar way to using /etc/hosts file


colinireland

Recommended Posts

Hello,

 

I am looking for a push in the right direction. I would like to be able to view a website that is duplicated on many servers by specifying the IP address. Similar to how one would use the hosts file.

 

I can do this using netcat

nc 1.2.3.4 80

Host: example.com

GET /contact-us.html

<CR><CR>

 

Can someone tell me how I would go about porting this to PHP? I would just like to set up a small page on my webserver where I can enter the domain and IP address and have the page displayed back to me.

 

Thanks Colin

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.