Re: Website preview script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2012-02-29 at 19:54 +0100, Simon Schick wrote:

> Hi, Nibin
> 
> I wonder what you'd call a <website preview> ...
> Do you mean a screenshot or the HTML-response from the server, specially
> prepared (sounds like you want to create a proxy ;))?
> 
> Bye
> Simon
> 
> 2012/2/29 Nibin V M <nibinvm@xxxxxxxxx>
> 
> > No..what I am trying to write a "website preview" plugin attached to a
> > control panel.. :)
> >
> > since I am a newbie, I don't know how to achieve this without modifying
> > hosts file ( I am basically a linux sys admin ) :)
> >
> > @Martin -  I will check it. Since I am a beginner ( of course, just started
> > to learn PHP today ) I need to start from scratch. If yo could provide some
> > sample code, it will be great :)
> >
> > thanks for your input guys..
> >
> > On Thu, Mar 1, 2012 at 12:11 AM, Ashley Sheridan
> > <ash@xxxxxxxxxxxxxxxxxxxx>wrote:
> >
> > > **
> > > On Wed, 2012-02-29 at 19:29 +0100, Matijn Woudt wrote:
> > >
> > > On Wed, Feb 29, 2012 at 7:07 PM, Nibin V M <nibinvm@xxxxxxxxx> wrote:
> > > > Hello,
> > > >
> > > > 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.phpwhich
> > > > 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.compoints to
> > > > <my IP>. I can do this with this little script.
> > > >
> > >
> > > How about just doing a str_replace[1]?
> > >
> > > - Matijn
> > >
> > > [1]http://www.php.net/str_replace
> > >
> > >
> > > Why can't you use an iframe, or are you trying to offer this other
> > > websites content as if it were on your own site? If so, I would first
> > check
> > > to see if you're actually allowed to do that, as that will bring up
> > quite a
> > > few copyright issues otherwise, which can be very expensive.
> > >
> > >   --
> > > Thanks,
> > > Ash
> > > http://www.ashleysheridan.co.uk
> > >
> > >
> > >
> >
> >
> > --
> > Regards....
> >
> > Nibin.
> >
> > http://TechsWare.in
> >


It does sound more like a proxy than a preview script.

What about using something like this:
http://uk3.php.net/manual/en/function.imagegrabscreen.php 

I've never used it, but on first appearances it looks like it should
produce the preview you require.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux