"Renaissance Thinking About the Issues of Our Day"
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 Radio Program
Live : Mon-Fri
3pm - 6pm Eastern
Live radio | Live TV | Podcast
Syndicated by Dial-Global, Pacifica, and simulcast on Free Speech TV Network on Dish Network and DirectTV, and on radio stations, American Forces Radio, and Sirius/XM. Live in the US, Africa, Europe and across North America - more people listen to or watch the TH program than any other progressive talk show in the world.
---------------------------
Live Mon-Fri on Free Speech TV and RT in over 50 million American homes, and more than 500 million homes in over 100 countries worldwide
9pm & 11pm Eastern
Podcast | TV Highlights
----------------------------
Thom's Free IPhone App