« Suprise! Get K5 today AND 50% off | Home | An Exciting K5 First Week »
K5 SSEC Integration
By Kaptain Krayola | November 13, 2007
The Kaptain was contacted by a user of SSEC who wanted to integrate the K5 content into their SSEC template so the Kaptain whipped up a quick php script to take care of that for them.
Click here to download the script
It’s very simple to use, all you have to do is create a folder named “cache” here: /var/www/simplified/ or change the path in the script to where your cache folder is. Make sure the folder is writable so the script can cache the content returned from K5 for each page.
Once that is in place add the following code to your SSEC template wherever you want the K5 content to appear:
$keyword = ‘{%keyword%}’;
$numgen = 1;
include “../k5-ssec.php”;
Note: the $numgen variable is how many paragraphs you want to appear.
Its a very basic script so feel free to edit and improve it. Do the Kaptain a favor and send over any additions to it so he can make it available for everyone else.
Topics: K5 Tools |


























November 15th, 2007 at 3:24 am
Can you tell us what the modifcations would be if this was on a cpanel server rather than noncpanel?
I have cpanel
My skeletal files have a index.php
and my simplified app folder has the simplified files.
so the kk-sec.php file would go in the main app folder or every folder of every domain? and about cache directory?
November 28th, 2007 at 9:51 am
If you’re using cpanel, you just don’t need to use the abolute path to resources inside the script. You only need to edit a couple lines like this one:
$filename = ‘/var/www/simplified/cache/’.$cache_filename;
As long as your .htaccess is setup correctly (and I assume it is since you probably can’t edit it and your hosting co. set it up), you shouldn’t need to use absolute directory structure.
Also kaptain, you could make your script more flexible if you used getcwd and such. I’ll talk to you about it on IM in a minute.