Skip to content

{ Category Archives } Web Design

Using S3 files in PHP

As I wrote, I'm using Amazon S3 to store files that are too expensive to keep on my web server, with the plan of having frequently-updated files on the server and relatively constant stuff on S3. The address for my S3 server is bililite.s3.amazonaws.com, which is stored in the global variable $_SERVER['CDN']. So to include [...]

Using NFS.net with Amazon S3

Since I started using nearlyfreespeech.net 3 months ago, I've been very pleased. Getting them to set up access with a private key was straightforward and the email support person was prompt, helpful and friendly. The only downsides are the safe mode restrictions, which I have been easily able to work around, and the expensive storage [...]

Inline Audio Player

Download the code. Demo. Download the WP Audio Player Standalone. So the rabbi asked me to add the ability to play the audio on the taamim page (basically, a long list of short MP3's) directly on the page, rather than click the link to open a new page. No problem, right? We're living in an [...]

Nearly Free Speech

I've used 1&1 since I started mucking about on the web; they had a cheap plan for $3/month with one domain name and a simple LAMP stack. But the price has been going up (now $5/month; still comparatively cheap!), and I'm starting to chafe at the limitations (no SSH shell access, proprietary 404 pages, no [...]

New Amazon Advertising API

Just got an email from Amazon reminding me that "As part of our continued effort to ensure that the Product Advertising API is an efficient and effective advertising tool, we’ve identified opportunities to streamline the API", which is their way of saying that the API exists to make them money. Anything that doesn't serve that [...]

Writing CGI scripts

nearlyfreespeech runs with safe mode and safe_mode_gid on, so you can't run shell scripts or other cool things. Usually that's not an issue, but if you do, they let you run CGI scripts, in any of a number of languages. You just have to treat it as a shell script, with a shebang notation of [...]

Things I Learned About .htaccess, part 2

I've learned some things about .htaccess, but mostly I've learned that programming it is deep black magic. The most important thing is "Don't use mod-rewrite unless you absolutely need to". All the fancy stuff is better off done by the PHP (or whatever language you're using) code. Don't do: RewriteEngine On RewriteBase / RewriteRule ^([^/\.]+)/$ [...]

A New Twist in Comment Spam

I get lots of comment spam, either obvious ads for dubious products or boilerplate praise in almost understandable Engfish ("This is the most coherent soliloquy on this germane topic in the recent memory") with links to the ads. But I'd never seen comment spam that went out of its way to insult me: The subsequent [...]

Trying to Search with Bing and Failing

I'm not a fan of having to create a Google Custom Search Engine to limit searches to one site with an HTML form (which seems to be necessary for mobile sites), so let's play with Bing: <form method="get" action="http://www.bing.com/search" > <input name="q" type="text"/> <input type="submit" value="Search with Bing"/> <input name="q1" value="site:http://bililite.nfshost.com/blog" type="hidden"/> </form> And it [...]

Back to a Simple Google Search Form

Earlier, I noted that the old, simple Google search: <form method="get" action="http://www.google.com/search" > <input name="q" type="text"/> <input type="submit" value="Search with Google"/> <input name="sitesearch" value="http://bililite.nfshost.com/blog" type="hidden"/> </form> is deprecated and doesn't work from Google's mobile site. Google does have an API for custom searches that has all sorts of fancy parameters to manipulate, but it requires [...]