Tutorials
PHP Code to post to wordpress.
Tuesday, August 24th, 2010So if you are like many of the others out there struggling to automatically post to wordpress, I figured I’d give a little help today. We’ve gone into a lot more detail inside the codebank, however, this should be enough to get anyone going. (warning: Wordpress does like to garble code and I’m to lazy [...]
Electronic Cigarette Affiliate Program
Tuesday, July 27th, 2010It’s been a few months since I mentioned e-cigs to my readers here. I had stepped back a bit because I was “sure” the FDA was going to kill them before now. With an actual lobbying group running, and the obvious benefits of using electronic cigs – well it’s time to be an affiliate if [...]
More WP Facebook Hacks.
Tuesday, May 11th, 2010Here is another little trick – that might get more folks to log in your site and leave a comment with facebook. Open up your theme editor in WP. Find sidebar.php or sidebar2.php and just after the sidebar Div Tags add something like this: <h2> Who is New?</h2> <ul> <?php $usernames = $wpdb->get_results(“SELECT user_nicename, user_url [...]
Hacked WordPress Blog? Find and Replace in Mysql
Wednesday, April 28th, 2010I just got done helping a client that had their WordPress Blog hacked into. Normally when a blog is hacked into the actual theme files are modified. A fix is as simple as opening the files up and finding the offending injected code and doing a global find and replace through the command line, or [...]
How to make your own Twitter Poster in PHP with Curl
Wednesday, December 23rd, 2009Twitter offers a handy dandy API for posting to itself. It’s not hard to work with (you just have to organize your data the right way). You need to have a few variables set up prior to running this. $message (what you are posting to twitter — a day or so ago I provided the [...]
Convert Url to Tiny Url
Tuesday, December 22nd, 2009Sometimes you need to convert a url to a new one on the fly. Tinyurl offers a very easy to use API to do that. You can do it complicated with curl or you can just use file_get_contents and make it a one line function. function ShortURL($ToConvert) { $short_url= file_get_contents(“http://tinyurl.com/api-create.php?url=” . $ToConvert); return $short_url; } [...]
Random RSS Item with PHP and ICONV for formatting.
Saturday, December 19th, 2009So I had to hack together a little snippet today that would return just one single item from a rss feed and have it be random from the available items. (For example this snippet of code will return one random rss item from blackhatdigest – skipping the most recent entry) function load_xml_feed($location) { global $value1; [...]
Strange Characters in your RSS feeds when you try to display them? Fix it!
Tuesday, November 24th, 2009If you have been working with RSS feeds chances are you’ve come across strange characters like “” and struggled to make them go away — we all have. First you try and preg match them all…. but different ones keep popping up. And of course by the time you are done you are convinced that [...]
Aligning Adsense (or other ads) so they float right or left.
Thursday, June 4th, 2009I’m just posting this here because even after almost a decade of building websites I can NEVER remember the code to float an ad or image where I want it. I always have to look it up – and I’m sure I’m not the only one. Considering how often we ad advertisements/adsense/images to our blog [...]
All Right – My Auto Blogging Abusifier :)
Tuesday, May 19th, 2009Well I asked for 5 comments for me to spout off about how I auto blog…. and I got it. I’ll start off by saying that there are MANY ways to run an auto blog, and go into that (at least a few of my favorite methods) – then I’ll cover a bit on how [...]

