This is True
by Randy Cassingham

"It's nearly impossible to read these and not laugh out loud." --Philadelphia Daily News

Free Syndication: True-a-Day -- SSI/PHP Version


Warning: readfile(navbar.inc): failed to open stream: No such file or directory in /var/www/vhosts/thisistrue.com/httpdocs/tad-ssi.php on line 18
For more advanced webmasters, we also offer the True-a-Day feed in a format for servers set up for SSI and PHP. That way, the stories work even if your visitors don't have browsers capable of displaying javascript-generated content. SSI (Server-Side Include) allows your server to do the integration of the TAD feature with your page, rather than the end-user's browser.

If this is confusing to you, just use the javascript version on the main TAD page -- it works for nearly everyone. Sorry, but we cannot help you implement this free feature on your server.

Again with the default settings (plus centering), it looks like this (PHP):

This is True®

by Randy Cassingham

Stories from Our Archives ©1994-2008

Sock it to Me
Two men in Southport, Merseyside, England, who told people they needed to collect used socks for charity, managed to collect 10,000 pairs. But the two, Steven Bain, 27, and Steven Gawthrop, 31, were actually foot fetishists, police say, and the socks were piled all over their apartment up to 18 inches deep. “They were all over the furniture, hanging from lampshades and even in the microwave, frying pan and cooker,” said one officer who raided the flat. “It was like there had been an explosion in a sock factory.” Police also found pictures of some of the victims holding up their socks before donating them. The pictured included two uniformed policemen and a traffic warden. (London Times) ...However, police were unable to find any two that matched.

Subscribe Free

Get This is True by e-mail once a week



Visit TrueTrue Story collections
Get This Service for Your Site

This was done by simply adding the line:

<? readfile ("http://thisistrue.net/cgi-bin/tad.pl?ssi=1"); ?>

to this page, and changing its extension to .php (vs .html, which is this site's normal page extension). This server is Apache on Linux. If you "view source" for this page you will see that the actual story text is shown, not the "readfile" line -- the server replaced the line with the file it was calling. That's the power and utility of SSI.

The "ssi=1" flag tells the True-a-Day application on our server to present its output in HTML, rather than javascript document.write calls.

For pure SSI applications, the above invocation may or may not work -- the very common Apache web server's SSI function does not allow includes from remote servers unless you use PHP! It can easily be made to work, however, using a proxy on your server, which is great if you don't want to use PHP. Here's how:

  • Create the file proxy.pl in your cgi-bin directory with these three lines, verbatim:
  • Make sure proxy.pl ownership and other attributes, including "executable", are correct for your system

  • Call the TAD function with this line from your web page:

Naturally, we don't have the resources to support all possible configurations, so you're pretty much on your own implementing these advanced versions of TAD. However, if you suspect a problem with TAD itself, we'd appreciate hearing about it.

If you're interested in the technical background on how these advanced SSI topics work, see this article on the subject.

Customization Options

As with the javascript version, you don't need to use any of these, but they are available to customize TAD's look for your site. Note the syntax is slightly different from the javascript version.

ParameterUseExample
float= sets horizontal position TAD appears float=right
(can also use left)
width=the number of pixels you want the TAD box to be, or the percentage of your page width (default: 55%) width=500px or width=55%
headerbgcolor=  background color of the top and bottom cells (default: light blue -- ADD8E6) headerbgcolor=white or
headerbgcolor=FFFFFF (Note: the FFFFFF is the standard hexcode without the #)
bodybgcolor= background color of the middle cell (default: beige -- F5F5DC) bodybgcolor=FFFFFF or
bodybgcolor=white

How to add the parameters to the script call:
Include one or more, without spaces, after the tad.pl part. The first parameter is the "ssi=1" and must start with "?". Any additional parameters are separated with a simple "&". Example:

A Note Regarding XHTML Validation

Our tad.pl program outputs a stylesheet reference. While this works properly, it is technically not valid XHTML because it happens in your page's <body>, and may cause your page to fail to validate. If validation is a concern for you:

  • Add the following anywhere in your page's <head> section:
    <link rel="stylesheet" href="http://thisistrue.net/tad.css" type="text/css" />

  • Add the following parameter to your tad.pl call:
    style= (i.e., "style=" followed by nothing)


Copyright © 2005 by ThisisTrue.Inc, All Rights Reserved worldwide. May not be copied, stored or redistributed without prior, written permission. "This is True®" is a registered trademark of ThisisTrue.Inc.

http://www.thisistrue.com/tad-ssi.php
Updated: March 2005