On Wed, Feb 29, 2012 at 7:07 PM, Nibin V M <nibi...@gmail.com> wrote:
> I am very new to PHP coding. I am trying to achieve a task via PHP,
> regarding which I have been googling around for a few days and now come up
> with emtpy hands!
> Ok, what I need to write is a "website preview script". That is I need to
> display a website hosted on serverA and pointing elsewhere, from ServerA (
> via curl possibly ).
> For example: I have configured techsware.in and google.com on ServerA ( of
> course google.com pointing to their IP ). I need to display the contents of
> google.com "on my server" , if I call http://techsware.in/google.php which
> has some curl coding in it! Note, what I have is the domain name (
> google.com ) and the IP on which it is hosted on serverA to achieve this.
> Any way to achieve this?
> I can achieve this if I put <my IP> google.com in /etc/hosts file ( its
> Linux ). But I need to run this script for normal users as well, which
> won't have super user privileges and thus unable to edit /etc/hosts file.
> So I want to specify somewhere in the PHP script that, google.com points to
> <my IP>. I can do this with this little script.
How about just doing a str_replace?
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php