Sometimes I surprise myself
Aug. 11th, 2005 09:45 amI surprised my boss yesterday. We've redesigned a web site for our latest client and we've done the whole thing in PHP. However, the client wants to be able to make changes to the pages herself, and the editor they'll be using doesn't recognize PHP.
There's nothing in the site that requires PHP — no database backend, for instance — so no real reason to use PHP. Given that, the boss decided last night that we needed to deliver a site that was just HTML, which would necessitate converting all of the files to HTML.
As we were discussing this, I realized that I could use a command line program, wget, to request all the pages from the web server and mirror the site on my hard drive, essentially using the web server to convert the files. That's what the server does anyway — it converts the PHP files (or whatever language you're using) into HTML to send to the client.
So while we were still discussing it, I was already mirroring the site. Then I wrapped it up in a zip file and dropped it into the chat window and told him that would give him a head start on converting. All he'd have to do is rename the .php extension to .html and search for .php in the file links and replace them all with .html. I would have done it for him, but I needed to get out of the office to catch a train back to Forest Glen.
We spoke on the phone a few minutes later and he told me he was thunderstruck when I sent him the converted site. :-)
And this morning there's a new site up for the client's review. I have no idea what sort of method he might have used to convert the files himself, but it would have taken a lot longer!
He also got to watch me spin out an SQL statement on another project in just a few minutes that accomplished something complicated, so I got points for that as well. And I finally licked another bug that was plaguing yet another project, so yay for me there as well.
There's nothing in the site that requires PHP — no database backend, for instance — so no real reason to use PHP. Given that, the boss decided last night that we needed to deliver a site that was just HTML, which would necessitate converting all of the files to HTML.
As we were discussing this, I realized that I could use a command line program, wget, to request all the pages from the web server and mirror the site on my hard drive, essentially using the web server to convert the files. That's what the server does anyway — it converts the PHP files (or whatever language you're using) into HTML to send to the client.
So while we were still discussing it, I was already mirroring the site. Then I wrapped it up in a zip file and dropped it into the chat window and told him that would give him a head start on converting. All he'd have to do is rename the .php extension to .html and search for .php in the file links and replace them all with .html. I would have done it for him, but I needed to get out of the office to catch a train back to Forest Glen.
We spoke on the phone a few minutes later and he told me he was thunderstruck when I sent him the converted site. :-)
And this morning there's a new site up for the client's review. I have no idea what sort of method he might have used to convert the files himself, but it would have taken a lot longer!
He also got to watch me spin out an SQL statement on another project in just a few minutes that accomplished something complicated, so I got points for that as well. And I finally licked another bug that was plaguing yet another project, so yay for me there as well.