Using Thom's Blog on your website

SETTING UP THE THOM HARTMANN PROGRAM BLOG

You are invited to display Thom Hartmann's Daily Blog on your website.

This is a text blog with a picture and logo. There are no font size or font styles included in the code, other than bolding of headings.

Each day, we will update the blog text and it will appear on your site straight away.

To enable the blog to show, you need to cut and paste some code into a web page of your choice. This is a one-time operation.

Below, you will find four different sets of code. The one you use will depend on the structure of your website.

The first is a simple java script and the remainder are various PHP versions.

We are unable to support installation issues.

The Thom Hartmann Daily Blog is updated each day, Monday to Friday and is freely available and supplied without warranty.

-Webmaster-
Thom Hartmann Program


HERE ARE THE SCRIPTS



JavaScript:

Here is the JavaScript code to paste into syndication site web pages when using the JavaScript syndication method:

<script src="http://thpsyndication.com/syn/MSG.cgi?tho" type="text/javascript" language="JavaScript"> </script>

PHP:

Here is the PHP code to paste into syndication site web pages. There are 3 different PHP code blocks here. Use only one of them.

The first PHP code is the simplest to implement because it is shorter and does not require your server to run PHP code before the content is delivered. The second is a rather large block of code.

The first should work on most PHP enabled servers. If the first doesn't, the second should work.

The third block is for use when your server needs to run PHP code before the content is delivered to the remote syndication site.

Which block of code and which method you use, is up to you.

Here is the first PHP method:

<?php @readfile('http://thpsyndication.com/syn/MSG.cgi?PHP2&tho'); ?>


Here is the second PHP method:

<?php $URL = 'http://thpsyndication.com/syn/MSG.cgi?PHP2&tho'; function GetContentFromScript($url) { if(strpos($url,'/') == 0) { $url =

'http://'.$_SERVER['SERVER_NAME'].$url; } $tpos = strpos($url,'://'); if($tpos > 0) { $url = substr($url,$tpos+strlen('://')); } $uri = '/';

$host = $url; $tpos = strpos($url,'/'); if($tpos > 2) { $host = substr($url,0,$tpos); $uri = substr($url,$tpos); } $content = ''; $fp =

@fsockopen("$host", 80, $errno, $errstr, 30); if(!$fp) { echo "$errstr ($errno)<br />\n"; return; } else { fwrite($fp,"GET $uri HTTP/1.0\r\n");

fwrite($fp,"Host: $host\r\n"); fwrite($fp,"Connection: Close\r\n"); fwrite($fp,"\r\n"); while (!feof($fp)) { $content .= fgets($fp, 128); }

fclose($fp); } $n = strpos($content,"\n"); $r = strpos($content,"\r"); $eolchar = ''; if($r === false) { $eolchar = "\n"; } elseif($n === false)

{ $eolchar = "\r"; } else { if($r < $n) { $eolchar = "\r\n"; } else { $eolchar = "\n\r"; } } $eolpos = strpos($content,"$eolchar$eolchar");

$content = substr($content,($eolpos + strlen("$eolchar$eolchar"))); return $content; } echo(GetContentFromScript($URL)); ?>

And here is the third PHP method:

<?php @include_once('http://thpsyndication.com/syn/MSG.cgi?PHP2&tho'); ?>


Enjoy using the blog!

Thom Hartmann is the nation's #1 progressive radio talk show host (also simulcast as TV in 60 million homes by Dish Network/DirectTV/Free Speech TV), and the New York Times bestselling, 4-times Project Censored winning author of 21 books in print. In its eighth year, THE THOM HARTMANN PROGRAM airs live daily, NOON – 3pm, ET simulcast as both radio and TV on over 120 affiliates, including both nationwide satellite radio stations (Sirius/XM), into more than 50 million homes via both nationwide satellite TV systems (DirecTV and Dish Network), totaling over 120 radio stations and TV cable systems.  The program is seen or heard in 7 of the top 10 US markets and 17 of the top 25, as well as in Africa and the United Kingdom.

Join Thom September 11th at the Fighting Bobfest, near Madison WI Fighting Bob Fest is an annual Chautauqua featuring progressive speakers, networking opportunities, and entertainment on the tradition of Robert “Fighting Bob” La Follette. Thom will be there with Jim Hightower, Reverend Jesse Jackson, Sr., Greg Palast and more.

Add Thom's Blog to your site.This easy to add code brings Thom's daily blog to your website

New in paperback - Threshold: 
The Progressive Plan to Pull America Back from the Brink

 Unequal Protection - NEW - a complete re-write and update of Thom's classic story of "How Corporations Became 'People' and How You Can Fight Back."  To amend the constitution to say "corporations are not people" go to www.movetoamend.org

Grab the podcast