Converting dynamic site to static site 
Author Message
 Converting dynamic site to static site

I have a site that was programmed using PHP/Mysql and mod_rewrite for
displaying information. The client now wants to put the entire site on
CD so they can use it in their browser.

Does anyone know of a trick to pull this content down into a static site
where all the links are changed as well? Even pointers on what you would
do in this situation would be helpful at this point.

TIA

--

PHP POSTERS: Please use comp.lang.php for PHP related questions,
              alt.php* groups are not recommended.



Mon, 04 Apr 2005 00:06:47 GMT  
 Converting dynamic site to static site

Quote:
> I have a site that was programmed using PHP/Mysql and mod_rewrite for
> displaying information. The client now wants to put the entire site on
> CD so they can use it in their browser.

> Does anyone know of a trick to pull this content down into a static site
> where all the links are changed as well? Even pointers on what you would
> do in this situation would be helpful at this point.

I have a similar need, and have been contemplating building a tool to do it.

BV.



Mon, 04 Apr 2005 00:11:29 GMT  
 Converting dynamic site to static site


Quote:
>I have a site that was programmed using PHP/Mysql and mod_rewrite for
>displaying information. The client now wants to put the entire site on
>CD so they can use it in their browser.

>Does anyone know of a trick to pull this content down into a static site
>where all the links are changed as well? Even pointers on what you would
>do in this situation would be helpful at this point.

>TIA

Not sure if this would work but it might be worth looking at:
http://gtk.php.net/

Trevor



Mon, 04 Apr 2005 00:30:52 GMT  
 Converting dynamic site to static site


Quote:


> > I have a site that was programmed using PHP/Mysql and mod_rewrite for
> > displaying information. The client now wants to put the entire site on
> > CD so they can use it in their browser.

> > Does anyone know of a trick to pull this content down into a static site
> > where all the links are changed as well? Even pointers on what you would
> > do in this situation would be helpful at this point.

> I have a similar need, and have been contemplating building a tool to do
it.

> BV.

Wouldnt an application such as SiteGrabber do this?....


Mon, 04 Apr 2005 00:36:24 GMT  
 Converting dynamic site to static site

Quote:



>>I have a site that was programmed using PHP/Mysql and mod_rewrite for
>>displaying information. The client now wants to put the entire site on
>>CD so they can use it in their browser.

>>Does anyone know of a trick to pull this content down into a static site
>>where all the links are changed as well? Even pointers on what you would
>>do in this situation would be helpful at this point.

>>TIA

> Not sure if this would work but it might be worth looking at:
> http://gtk.php.net/

I don't think there is enought time to learn the gtk-php API stuff - or
at least it would be quicker for me to convert it all by hand.

--

PHP POSTERS: Please use comp.lang.php for PHP related questions,
              alt.php* groups are not recommended.



Mon, 04 Apr 2005 00:36:46 GMT  
 Converting dynamic site to static site

Quote:





>>>I have a site that was programmed using PHP/Mysql and mod_rewrite for
>>>displaying information. The client now wants to put the entire site on
>>>CD so they can use it in their browser.

>>>Does anyone know of a trick to pull this content down into a static site
>>>where all the links are changed as well? Even pointers on what you would
>>>do in this situation would be helpful at this point.

>>I have a similar need, and have been contemplating building a tool to do

> it.

>>BV.

> Wouldnt an application such as SiteGrabber do this?....

No, all that does is create images according to the descriptions. I also
need the functionality (links, rollovers, etc.)

--

PHP POSTERS: Please use comp.lang.php for PHP related questions,
              alt.php* groups are not recommended.



Mon, 04 Apr 2005 00:39:34 GMT  
 Converting dynamic site to static site

Quote:

> I have a site that was programmed using PHP/Mysql and mod_rewrite for
> displaying information. The client now wants to put the entire site on
> CD so they can use it in their browser.

> Does anyone know of a trick to pull this content down into a static site
> where all the links are changed as well? Even pointers on what you would
> do in this situation would be helpful at this point.

This is not as trivial as it sounds. Let's say for a moment that your site
is full of links which look like this:

http://www.myserver.com?article_id=745859

If you want to "staticize" that you've got to replace the code which handles
the collection of article_id X and pull the content from a static store.
That in itself is probably no trivial task (depends 100% on the
implementation of the dynamic site). And that's only the start of it -
calls which log in the user, create a stylesheet from the db, etc., all
have to be modified/replaced to use a non-db (okay, non-dynamic) source.

Now... session handling? How do you do that without a web server and/or a
runtime engine like PHP/Tomcat/etc?

Good luck is all i can say. My first thought is that this would have to be a
design detail built into a site's framework from the start to have any
chance of really working. i'd be happy to be proven wrong, though.

i would say that the exact difficulty of the task depends almost entirely on
the currently-used dynamic system and how well it adapts to using alternate
data sources.

----- stephan beal
Registered Linux User #71917 http://counter.li.org
I speak for myself, not my employer. Contents may
be hot. Slippery when wet. Reading disclaimers makes
you go blind. Writing them is worse. You have been Warned.



Mon, 04 Apr 2005 00:44:08 GMT  
 Converting dynamic site to static site

Quote:


> This is not as trivial as it sounds. Let's say for a moment that your site
> is full of links which look like this:

> http://www.myserver.com?article_id=745859

As I said, I used mod_rewrite, so I don't get anything like that in
fact, it would look more like:

http://www.myserver.com/article/745859

Quote:
> Now... session handling? How do you do that without a web server and/or a
> runtime engine like PHP/Tomcat/etc?

None of that (at least that needs to be converted) - TG!

The URL is http://www.lakevermilionresorts.com/

I was thinking that wget could do what I want, but I can't get quite the
correct options. I realize that there will be something that I will have
to modify myself, but my biggest problem comes with my rewrite rules.

For instance, if I want to go to /lodging/, the actual page that is
displayed is mypage.php?section=lodging - which is unknown to the
browser. (They only know the REQUEST_URI of /lodging/)

This part isn't so bad, but then there are sub-pages to lodging:
RewriteRule ^lodging/([^/]*)[/]?$ mypage.php?section=lodging&subpage=$1

Again, _any_ suggestions would be appreciated since I'm not sure how I
want to go about this yet.

--

PHP POSTERS: Please use comp.lang.php for PHP related questions,
              alt.php* groups are not recommended.



Mon, 04 Apr 2005 00:56:22 GMT  
 Converting dynamic site to static site
...

Quote:
> I was thinking that wget could do what I want, but I can't get quite the
> correct options. I realize that there will be something that I will have
> to modify myself, but my biggest problem comes with my rewrite rules.
...
> Again, _any_ suggestions would be appreciated since I'm not sure how I
> want to go about this yet.

My only suggestion is to pray to your diety of choice that you never get
such a contract again! ;)

Seriously, though, it sounds quite challenging, but to the point where it
sounds like it won't be worth the trouble. Might be simpler to create a
Linux bootable CD and install php/apache/mysql on it and use THAT for demos
(except that you then can't write to the database, since it's RO media).

----- stephan beal
Registered Linux User #71917 http://counter.li.org
I speak for myself, not my employer. Contents may
be hot. Slippery when wet. Reading disclaimers makes
you go blind. Writing them is worse. You have been Warned.



Mon, 04 Apr 2005 01:07:47 GMT  
 Converting dynamic site to static site

Quote:
> I have a site that was programmed using PHP/Mysql and mod_rewrite for
> displaying information. The client now wants to put the entire site on
> CD so they can use it in their browser.

> Does anyone know of a trick to pull this content down into a static
site
> where all the links are changed as well? Even pointers on what you
would
> do in this situation would be helpful at this point.

> TIA

An application such as Wget would do this for you, if you use its
"maximum recursive web-suck" option then it will try to download damn
near the entire internet if you set it wrong or have a lot of external
links.


Mon, 04 Apr 2005 01:26:42 GMT  
 Converting dynamic site to static site

Quote:
> I have a site that was programmed using PHP/Mysql and mod_rewrite for
> displaying information. The client now wants to put the entire site on
> CD so they can use it in their browser.

> Does anyone know of a trick to pull this content down into a static site
> where all the links are changed as well? Even pointers on what you would
> do in this situation would be helpful at this point.

Unfortunately, I don't know any tricks.

I'm in the same situation and the solution I'm using is to write PHP code to
create HTML files from the information in the database.

In my case it's something I'll do often since I plan to update the CDROM
quarterly so it makes sense to invest the time writing the PHP code.

-- Roger
http://www.harrynilsson.com/
New Nilsson CDs!



Mon, 04 Apr 2005 01:40:11 GMT  
 Converting dynamic site to static site

Quote:


> ...

>>I was thinking that wget could do what I want, but I can't get quite the
>>correct options. I realize that there will be something that I will have
>>to modify myself, but my biggest problem comes with my rewrite rules.

> ...

>>Again, _any_ suggestions would be appreciated since I'm not sure how I
>>want to go about this yet.

> My only suggestion is to pray to your diety of choice that you never get
> such a contract again! ;)

> Seriously, though, it sounds quite challenging, but to the point where it
> sounds like it won't be worth the trouble. Might be simpler to create a
> Linux bootable CD and install php/apache/mysql on it and use THAT for demos
> (except that you then can't write to the database, since it's RO media).

> ----- stephan beal
> Registered Linux User #71917 http://counter.li.org
> I speak for myself, not my employer. Contents may
> be hot. Slippery when wet. Reading disclaimers makes
> you go blind. Writing them is worse. You have been Warned.

Unfortunately, that isn't an option since the client wants to take the
CD on the road with them and play it on other people's computers (where
they don't have internet access).

--

PHP POSTERS: Please use comp.lang.php for PHP related questions,
              alt.php* groups are not recommended.



Mon, 04 Apr 2005 02:25:40 GMT  
 Converting dynamic site to static site

Quote:


> > ...

> >>I was thinking that wget could do what I want, but I can't get quite the
> >>correct options. I realize that there will be something that I will have
> >>to modify myself, but my biggest problem comes with my rewrite rules.

> > ...

> >>Again, _any_ suggestions would be appreciated since I'm not sure how I
> >>want to go about this yet.

> > My only suggestion is to pray to your diety of choice that you never get
> > such a contract again! ;)

> > Seriously, though, it sounds quite challenging, but to the point where
it
> > sounds like it won't be worth the trouble. Might be simpler to create a
> > Linux bootable CD and install php/apache/mysql on it and use THAT for
demos
> > (except that you then can't write to the database, since it's RO media).

> Unfortunately, that isn't an option since the client wants to take the
> CD on the road with them and play it on other people's computers (where
> they don't have internet access).

Doe the client have any IT Support?  It may be best to kit out his laptop as
a web server and use that.
--
William Tasso - The road to hell is littered with fallen webmasters.
http://www.tbdata.com/hosting - ASP web site hosting + SQL Server
http://www.tbdata.com/cabling - Cat 5/6 network cabling installations


Mon, 04 Apr 2005 02:43:45 GMT  
 Converting dynamic site to static site

Quote:


> > ...

> >>I was thinking that wget could do what I want, but I can't get quite the
> >>correct options. I realize that there will be something that I will have
> >>to modify myself, but my biggest problem comes with my rewrite rules.

> > ...

> >>Again, _any_ suggestions would be appreciated since I'm not sure how I
> >>want to go about this yet.

> > My only suggestion is to pray to your diety of choice that you never get
> > such a contract again! ;)

> > Seriously, though, it sounds quite challenging, but to the point where
it
> > sounds like it won't be worth the trouble. Might be simpler to create a
> > Linux bootable CD and install php/apache/mysql on it and use THAT for
demos
> > (except that you then can't write to the database, since it's RO media).

> > ----- stephan beal
> > Registered Linux User #71917 http://counter.li.org
> > I speak for myself, not my employer. Contents may
> > be hot. Slippery when wet. Reading disclaimers makes
> > you go blind. Writing them is worse. You have been Warned.

> Unfortunately, that isn't an option since the client wants to take the
> CD on the road with them and play it on other people's computers (where
> they don't have internet access).

Tell them to plug their laptop into a phone line, and view it as intended!

:o)

Charles Sweeney
www.CharlesSweeney.com



Mon, 04 Apr 2005 03:56:55 GMT  
 Converting dynamic site to static site

Quote:

> Doe the client have any IT Support?  It may be best to kit out his laptop as
> a web server and use that.

Hell, I would have done that already if they had one... that's why this
is such a problem.

--

PHP POSTERS: Please use comp.lang.php for PHP related questions,
              alt.php* groups are not recommended.



Mon, 04 Apr 2005 04:45:24 GMT  
 
 [ 41 post ]  Go to page: [1] [2] [3]

 Relevant Pages 

1. Convert Static to Dynamic?

2. web templating for static sites?

3. ANNOUNCE: VRML site evolution to Web3D site

4. VRML Site is Cool Site of the Day (Iso-Topically)

5. cannot call php site out of php site

6. LLNL Web site / FTP site down

7. site appraisal: this Fri: 9am at the site/trailer

8. New Web Site: The Tcl Plugin How-to Site

9. Multilangual WEB-sites support through dynamic HTML-compilation.

10. Site for utility that converts EBCDIC file to ascii file

11. Static vs Dynamic Typing: Effects on Productivity?

 

 
Powered by phpBB® Forum Software