Re: Website preview script

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

 



HI all,

But what my requirement here is, I need to display the website configured
on our server. No matter where the domain actually points to :)

Perhaps it can call a proxy....here is the actual intention of creating
this script.

Suppose X created a new website on serverA, but the domain actually
pointing to ServerB. So to test his new website on ServerA, he either has
to edit "hosts" file or use serverA/~user. I don't want him not to use
either method. I would like to provide him a PHP feature on my control
panel says "site preview" through which he can view his website on serverA.
Its just like a website preview option in plesk control panel :)



On Thu, Mar 1, 2012 at 1:25 AM, Simon Schick <simonsimcity@xxxxxxxxxxxxxx>wrote:

> Hi, Ashley
>
> The question is what this function does ;)
> I think it really takes a screenshot of the server - whatever is shown
> there right now. But how to get a browser running there in full-screen?
>
> I came around that post for a couple of weeks ago and thought it could be
> useful for someone here:
> http://www.phpgangsta.de/screenshots-von-webseiten-erstellen-mit-php
>
> Bye
> Simon
>
>
> 2012/2/29 Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx>
>
>> **
>> 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
>>
>>
>>
>


-- 
Regards....

Nibin.

http://TechsWare.in

[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