Skip certain includes

2008-01-23 Thread Wayne Connolly
Hi,
I am using wget on php pages to mirror dynamic mysql/php pages from a staging 
server to a non-dynamic production server.

Ie: 
Staging Server A = Dynamic php/mysql
Production Server B = Flat rendered HTML in the form of *.php

There are some includes that i wish to remain dynamic -  can you skip certain 
includes - so these still get processed  by the server on the mirrored site 
whilst flattening the rest of the original dynamic content?

Ie. 
Server A
SomePage.php

//begin
 page

//end page


Server B

SomePage.php



//begin page
   <- this came from include("1.php");


  <- this came from include("3.php");
//end page

Cheers,
Wayne 










  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Re: Skip certain includes

2008-01-23 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Wayne Connolly wrote:
> Hi,
> 
> I am using wget on php pages to mirror dynamic mysql/php pages from a
> staging server to a non-dynamic production server.
> 
> Ie:
> Staging Server A = Dynamic php/mysql
> Production Server B = Flat rendered HTML in the form of *.php
> 
> There are some includes that i wish to remain dynamic -  can you skip
> certain includes - so these still get processed  by the server on the
> mirrored site whilst flattening the rest of the original dynamic content?

Hi Wayne,

As I've already mentioned on IRC, this question really has nothing to do
with Wget.

Wget doesn't process PHP code or includes at all: it's done entirely by
the server. Whatever you do will have to be done on the server end. And,
as twb and I also mentioned, using Wget to try to fetch unprocessed or
"partially" processed pages through the HTTP server (running PHP) seems
like the wrong way to do it.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHmCBr7M8hyUobTrERAkDAAJ9nXeIaiT55B8a54a4wM0Zk7CVy7QCfS6/6
EV9c8O/IUUw+J375thlsYzU=
=Hmq9
-END PGP SIGNATURE-


Re: Skip certain includes

2008-01-23 Thread Wayne Connolly
Micah,

Thanks mate- i know we chatted on IRC but just thought someone else may be able 
to provide some insight.

Cheers and thanks,
Wayne

- Original Message 
From: Micah Cowan <[EMAIL PROTECTED]>
To: Wayne Connolly <[EMAIL PROTECTED]>
Cc: wget@sunsite.dk
Sent: Thursday, January 24, 2008 4:21:48 PM
Subject: Re: Skip certain includes


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Wayne Connolly wrote:
> Hi,
> 
> I am using wget on php pages to mirror dynamic mysql/php pages from a
> staging server to a non-dynamic production server.
> 
> Ie:
> Staging Server A = Dynamic php/mysql
> Production Server B = Flat rendered HTML in the form of *.php
> 
> There are some includes that i wish to remain dynamic -  can you skip
> certain includes - so these still get processed  by the server on the
> mirrored site whilst flattening the rest of the original dynamic
 content?

Hi Wayne,

As I've already mentioned on IRC, this question really has nothing to
 do
with Wget.

Wget doesn't process PHP code or includes at all: it's done entirely by
the server. Whatever you do will have to be done on the server end.
 And,
as twb and I also mentioned, using Wget to try to fetch unprocessed or
"partially" processed pages through the HTTP server (running PHP) seems
like the wrong way to do it.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHmCBr7M8hyUobTrERAkDAAJ9nXeIaiT55B8a54a4wM0Zk7CVy7QCfS6/6
EV9c8O/IUUw+J375thlsYzU=
=Hmq9
-END PGP SIGNATURE-






  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Re: Skip certain includes

2008-01-24 Thread Matthias Vill
Wayne Connolly wrote:
> Micah,
> 
> Thanks mate- i know we chatted on IRC but just thought someone else may
> be able to provide some insight.
> 
> Cheers and thanks,
> Wayne

Well It's just impossible over wget to do this, because wget only get's
the output a client will get on visiting you page with no php-code
inside at all...
I don't know how good you can separate the includes... but if you can
separate them you can generate such a page and place an >>echo '';<< inside your source code instead of the
include. You could also switch between real and fake include on a
cookie-basis (wget supports cookies)

Maybe you got some inspirations...

Matthias


RE: Skip certain includes

2008-01-24 Thread Tony Lewis
Wayne Connolly wrote:

 

> Thanks mate- i know we chatted on IRC but just thought someone

> else may be able to provide some insight.

 

OK. Here's some insight: wget is essentially a web browser. If the URL
starts with "http", then wget sees the exact same content as Internet
Explorer, Firefox, and Opera (except in cases where the server customizes
its content to the user agent - in those cases you may have to tweak the
user agent to see the same content).

 

If the files are visible to FTP, then try using wget with a URL starting
with "ftp" instead.  Otherwise, if you want to mirror the files as they
appear on the server, you will have to use something like scp to transfer
the files directly from Server A to Server B.

 

Tony