Welcome to the David Walsh Blog! This website was created to reach every audience possible. Please contact me at david@davidwalsh.name to let me know if I can do anything to further improve your experience on this website.

Shell Archives

Read PDF and Word DOC Files Using PHP

Debuted Friday, January 2, 2009 @ 9:12 am
Sugar: PHP · Shell · link()

One of my customers has an insane amount of PDF and Microsoft Word DOC files on their website. It’s core to their online services so it’s not as though they’re garbage files up on the server. My customer wanted their website’s search engine (Sphider) to read these PDF files and DOC files so that their clients could get at the documents they needed without going through a bunch of summary pages to get them. I was successful in the task, so let me show you how to read PDF and DOC files using PHP.

Article Sep

Using Cygwin’s dig To Retrieve DNS Records

Debuted Friday, August 15, 2008 @ 7:33 am
Sugar: Shell

One of the most difficult parts of my job is managing DNS settings. It’s not that DNS is a particularly difficult thing to manage, but it’s somewhat foreign to me because they don’t teach it in school and there are huge consequences for messing things up. Not only can a business’ website be down, but their email as well. Whenever I need to retrieve DNS records from a nameserver, I use Cygwin and dig.

For this example, we’ll pretend that we need to retrieve the MX records for the davidwalsh.name domain. Here’s the format of how you use dig:

Article Sep

Download A File Using Cygwin and wget

Debuted Friday, August 8, 2008 @ 8:00 am
Sugar: Shell

Using Cygwin’s cURL package isn’t the only way to download a file.  You can also use Cygwin’s wget command to download any URL.

The Bash Script

wget http://davidwalsh.name/ -O davidwalsh.name.txt

I’m guessing that wget and cURL aren’t the only ways to download a file, but these are two easy ways to do so.

Also, look forward to more posts featuring wget — it has a plethora of uses!





 

 

comments twitter