Transferred by RW
By default, syndicated content is included into your site by having a line of javascript added into the html file of the page that will show the content. While this makes it more likely for people to both spend more time on this page and to link to this page, there is a technique that you can use to get an even greater SEO boost. This involves including your syndicated content on the server in a server side language instead of having the syndicated content resolved by the web browser. This can be accomplished by following two easy steps.
Step 1. Finding the server-side syndicated content URL
The first step is to determine the server-side syndicated content URL. To do this you start by looking at the javascript code that you received when you signed up for your syndicated content. It will look something like:
<script type='text/javascript' src='http://widgets.ziftsolutions.com/demo.ziftsolutions.com/js/8a7f877118f73180011906f7af280013'></script>
Important
To get the server-side syndicated content URL, take the value of the src attribute and replace the js with 'html'. The result will look like: http://widgets.ziftsolutions.com/demo.ziftsolutions.com/html/8a7f877118f73180011906f7af280013.
Step 2. Adding the right server-side processing
The second step is to determine what server side processing your web server supports. Zift Solutions supports server side processing for PHP, JSP, and ASP. (If you need something else, please contact Zift.) Include the appropriate code by following the directions for your server side language. The syndicated content will be included into the generated html pages in the location where you've added the code.
For PHP
Add into your php page:
<?php echo file_get_contents("compress.zlib://<syndicated content url>", False); ?>
where you replace <syndicated content url> with the value found from step 1.
(For Joomla users, here are directions for including php code)
For JSP:
Add into your jsp page:
<% try {
java.net.URL zift_url = new java.net.URL("<syndicated content url>");
java.io.BufferedReader zift_in = new java.io.BufferedReader(new java.io.InputStreamReader(new java.util.zip.GZIPInputStream(zift_url.openStream())));
String zift_output = "";
String zift_str;while ((zift_str = zift_in.readLine()) != null) {zift_output += zift_str;}zift_in.close(); out.write(zift_output);} catch (java.lang.Exception e) {}
%>
where you replace <syndicated content url> with the value found from step 1.
For ASP:
Add into your ASP page:
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.IO.Compression" %>
HttpWebRequest Http = (HttpWebRequest)WebRequest.Create("<syndicated content url>");
HttpWebResponse WebResponse = (HttpWebResponse)Http.GetResponse();
Stream responseStream = WebResponse.GetResponseStream();
responseStream = new GZipStream(responseStream, CompressionMode.Decompress);
StreamReader Reader = new StreamReader(responseStream, Encoding.Default);
Response.Write Reader.ReadToEnd();
%>
where you replace <syndicated content url> with the value found from step 1.