<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Black Hat SEO Digest &#187; Tutorials</title>
	<atom:link href="http://www.blackhatdigest.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blackhatdigest.com</link>
	<description>Black Hat SEO and Website Network Building</description>
	<lastBuildDate>Sat, 20 Aug 2011 17:17:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Cpanel API:  Create database with out root access</title>
		<link>http://www.blackhatdigest.com/cpanel-api-create-database-with-out-root-access/</link>
		<comments>http://www.blackhatdigest.com/cpanel-api-create-database-with-out-root-access/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 14:44:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.blackhatdigest.com/?p=965</guid>
		<description><![CDATA[The other day I found myself needing to be able to create a database, user, and assign the user on a shared host from a script.  Didn&#8217;t have root access so I didn&#8217;t think I would be able to use the cpanel api.  After struggling with some settings on my development machine it turns out [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I found myself needing to be able to create a database, user, and assign the user on a shared host from a script.  Didn&#8217;t have root access so I didn&#8217;t think I would be able to use the <a href="http://forums.cpanel.net/developer-discussions/136449-xml-api-php-class-version-1-0-a.html" target="_blank">cpanel api</a>.  After struggling with some settings on my development machine it turns out it&#8217;s really easy.</p>
<p>** Note all variables should be defined prior.  Dbhost, cpaneluser, cpanelpass, etc..</p>
<pre class="php">
$include <span class="phpString">'xmlapi<span class="phpOperator">.</span>php'</span><span class="phpText">;</span>
$xmlapi <span class="phpOperator">=</span><span class="phpKeyword"> new </span>xmlapi<span class="phpOperator">(</span>$db_host<span class="phpOperator">)</span><span class="phpText">;</span>
$xmlapi<span class="phpOperator">-<span class="phpOperator">&gt;</span></span>password_auth<span class="phpOperator">(</span><span class="phpString">"".$cpaneluser.""</span>,<span class="phpString">"".$cpanelpass.""</span><span class="phpOperator">)</span><span class="phpText">;</span>
$xmlapi<span class="phpOperator">-<span class="phpOperator">&gt;</span></span>set_debug<span class="phpOperator">(</span><span class="phpNumber">1</span><span class="phpOperator">)</span><span class="phpText">;</span><span class="phpComment">//output actions in the error log <span class="phpNumber">1</span><span class="phpKeyword"> for </span>>true </span>and <span class="phpNumber">0</span><span class="phpKeyword"> false
</span>
$xmlapi<span class="phpOperator">-<span class="phpOperator">&gt;</span></span>set_output<span class="phpOperator">(</span><span class="phpString">'<span class="phpFunction">array</span>'</span><span class="phpOperator">)</span>
$xmlapi<span class="phpOperator">-<span class="phpOperator">&gt;</span></span>set_port<span class="phpOperator">(</span>2083<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpComment">//You will have to<span class="phpKeyword"> use </span>2082<span class="phpKeyword"> if </span>you don<span class="phpString">'t have cURLSSL or OpenSSL compiled in you PHP binary<span class="phpText">;</span>//set this<span class="phpKeyword"> for </span>browser output
</span>
<span class="phpComment">//create database
</span>
$createdb <span class="phpOperator">=</span> $xmlapi<span class="phpOperator">-<span class="phpOperator">&gt;</span></span>api1_query<span class="phpOperator">(</span>$cpaneluser, <span class="phpString">"Mysql"</span>, <span class="phpString">"adddb"</span>, <span class="phpFunction">array</span><span class="phpOperator">(</span>$databasename<span class="phpOperator">)</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpComment">//create user
</span>
$usr <span class="phpOperator">=</span> $xmlapi<span class="phpOperator">-<span class="phpOperator">&gt;</span></span>api1_query<span class="phpOperator">(</span>$cpaneluser, <span class="phpString">"Mysql"</span>, <span class="phpString">"adduser"</span>, <span class="phpFunction">array</span><span class="phpOperator">(</span>$databaseuser, $databasepass<span class="phpOperator">)</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpComment">//add user to db
</span>
$addusr <span class="phpOperator">=</span> $xmlapi<span class="phpOperator">-<span class="phpOperator">&gt;</span></span>api1_query<span class="phpOperator">(</span>$cpaneluser, <span class="phpString">"Mysql"</span>, <span class="phpString">"adduserdb"</span>, <span class="phpFunction">array</span><span class="phpOperator">(</span><span class="phpString">"".$cpaneluser."_"</span>.$databasename.<span class="phpString">""</span>, <span class="phpString">"".$cpaneluser."_"</span>.$databaseuser.<span class="phpString">""</span>, '</span>all&#039;<span class="phpOperator">)</span><span class="phpOperator">)</span><span class="phpText">;</span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhatdigest.com/cpanel-api-create-database-with-out-root-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Like learning with video?</title>
		<link>http://www.blackhatdigest.com/like-learning-with-video/</link>
		<comments>http://www.blackhatdigest.com/like-learning-with-video/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 00:09:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Online Tools]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.blackhatdigest.com/?p=890</guid>
		<description><![CDATA[Do you like learning with video?  For a long long time I was a book junkie.  Hated tutorials on-line, and just wanted the paper in my hands.  I&#8217;d read a book a day &#8211; both reading and learning kinds.  However, kids change the time I&#8217;ve got available to me to do those things&#8230;. Now I [...]]]></description>
			<content:encoded><![CDATA[<p>Do you like learning with video?  For a long long time I was a book junkie.  Hated tutorials on-line, and just wanted the paper in my hands.  I&#8217;d read a book a day &#8211; both reading and learning kinds.  However, kids change the time I&#8217;ve got available to me to do those things&#8230;.</p>
<p>Now I just want some damn peace and quiet <img src='http://www.blackhatdigest.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve found that I really enjoy chilling out for 30 minutes or so a day with my headphones on watching something with my feet kicked up on the desk.  For a long time I&#8217;d pick something on Itunes, download it and watch a bit of it.  I don&#8217;t have the patience to actually sit and watch a movie, and I&#8217;ve got the same problem with the t.v.  Just can&#8217;t sit still that long and pay attention to it (ADD).  Always been that way if there is anything else to do.</p>
<p>Anyway, I was amazed when I discovered that I really really COULD sit and watch an entire video on something I wanted to learn how to do.  I&#8217;d get more out of it than I would a hard copy book and they are certainly cheaper.  A while back I picked up a <a href="http://tutsplus.com/amember/go.php?r=46868&amp;i=l0">nettuts+</a> premium subscription (for $9 bucks a month).  I watch about a video a day.</p>
<p>My &#8220;amazon&#8221; monthly spend has dropped several hundred dollars a month just from that $9 bucks <img src='http://www.blackhatdigest.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and I think I&#8217;m actually learning better.  I can pick and chose what I&#8217;m in the mood to learn that day.</p>
<p>My design skills are getting better.  I&#8217;ve learned a few different frameworks.  My javascript/ajax abilities are improving, etc&#8230;</p>
<p>Working on-line really means you need to know a lot of different things (when you do what I do).  I can&#8217;t just focus on programming, design, etc&#8230; I do it all.</p>
<p>Got resources you like other than <a href="http://tutsplus.com/amember/go.php?r=46868&amp;i=l0">nettuts+</a>?  Spill em &#8211; I&#8217;m interested in ruby, rails, python, php, and design(a little).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhatdigest.com/like-learning-with-video/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tutorial:  Making Facebook Application with PHP &#8211; part 1</title>
		<link>http://www.blackhatdigest.com/tutorial-making-facebook-application-with-php-part-1/</link>
		<comments>http://www.blackhatdigest.com/tutorial-making-facebook-application-with-php-part-1/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 23:55:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Facebook Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[facebook api]]></category>
		<category><![CDATA[facebook programming]]></category>
		<category><![CDATA[facebook sdk]]></category>
		<category><![CDATA[facebook tutorial]]></category>

		<guid isPermaLink="false">http://www.blackhatdigest.com/?p=887</guid>
		<description><![CDATA[This is the first post in what will probably be a half dozen or so by the time we are done. You can see them all by going here: Facebook Programming. Warning:  You will be programming here.  There is a plug and play solution that costs money.  You can read about that here:  Plug in [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first post in what will probably be a half dozen or so by the time we are done.  You can see them all by going here:  <a href="http://www.blackhatdigest.com/category/facebook-programming">Facebook Programming</a>.</p>
<p>Warning:  You will be programming here.  There is a plug and play solution that costs money.  You can read about that here:  <a href="https://billing.lujure.com/idev/idevaffiliate.php?id=243">Plug in facebook aps</a>.</p>
<h2>Let&#8217;s get started making your own Facebook application!</h2>
<p>Let&#8217;s start off by getting what we need to get from facebook.  Namely a developer account, and the PHP Software Development Kit.</p>
<p><a href="http://developers.facebook.com/docs/">http://developers.facebook.com/docs/</a></p>
<p>You will also need a developers account.</p>
<p><a href="http://www.facebook.com/developers/">http://www.facebook.com/developers/</a></p>
<p>You&#8217;ll also need a domain name with hosting to set things up on.  For this tutorial I&#8217;ll be making an application where users get to decide if they are zombies or humans&#8230;. and of course do fun stuff like tell their friends they are planning on eating their eyeballs when they catch them.</p>
<p>(vision inspired by my teenagers who I think envision us making videos and my having a development firm the size of zango &#8211; hence we will be scaling down their vision a bit to be based on reality)</p>
<p>So go get yourself your domain, set up a developer account and get yourself verified.  I&#8217;ll be back shortly with the next segment of this tutorial.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhatdigest.com/tutorial-making-facebook-application-with-php-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Xml Rpc to get the last category created on a wordpress blog</title>
		<link>http://www.blackhatdigest.com/using-xml-rpc-to-get-the-last-category-created-on-a-wordpress-blog/</link>
		<comments>http://www.blackhatdigest.com/using-xml-rpc-to-get-the-last-category-created-on-a-wordpress-blog/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 05:42:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.blackhatdigest.com/?p=879</guid>
		<description><![CDATA[WordPress has a handy dandy file in it called class-ixr.php that if you just include it in a php file you get to do a bunch of things. For this to work, you need to have class-IXR.php loaded up on the server you are working on (or on your local machine).  I&#8217;ve always just hit [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress has a handy dandy file in it called class-ixr.php that if you just include it in a php file you get to do a bunch of things.</p>
<p>For this to work, you need to have class-IXR.php loaded up on the server you are working on (or on your local machine).  I&#8217;ve always just hit up a WP install on the same server &#8211; but I don&#8217;t think it actually has to be a live blog either.  You just need to have that file.</p>
<p>In this example we are going to take the information for a blog that exists on another server.  It should have xml-rpc checked under settings so we can access it.</p>
<pre class="php">
include_once(&#039;../path/wp-includes/class-IXR.php&#039;);
define(&#039;BLOG_ID&#039;, 0);
define(&#039;RPC_USERNAME&#039;, $busername);
define(&#039;RPC_PASSWORD&#039;, $bpassword);
$xmlblog = $blog;
$xmlblog .= &#039;/xmlrpc.php&#039;;
$client = new IXR_Client($xmlblog);
		  $client-&gt;query(&#039;wp.getCategories&#039;, BLOG_ID, RPC_USERNAME, RPC_PASSWORD);
$categories = $client-&gt;getResponse();
foreach ($categories as $row) {
    $categories[] = $row[&#039;categoryId&#039;];
	}
$categories= max($categories);
if ($categories[categoryName] != &#039;&#039;)
{
echo &#039;The last category you created was:   &#039;;
echo $categories[categoryName];
echo &#039;<span class="htmlOtherTag">&lt;br&gt;</span>&#039;;
echo &#039;It\&#039;s Id number is&#039;;
echo $categories[categoryId];
$cats_id= $categories[categoryId];
}
else
{
	die(&#039;you do not have xml-rpc enabled or your user information is wrong&#039;);
	$xmlcheck = &#039;0&#039;;
}
?&gt;
</pre>
<p>This will spit out the id number and name of the last category created on the remote blog you&#8217;ve specified in $blog, $busername, $bpassword.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhatdigest.com/using-xml-rpc-to-get-the-last-category-created-on-a-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Code to post to wordpress.</title>
		<link>http://www.blackhatdigest.com/php-code-to-post-to-wordpress/</link>
		<comments>http://www.blackhatdigest.com/php-code-to-post-to-wordpress/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 06:13:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[BLOG_ID RPC_USERNAME RPC_PASSWORD]]></category>
		<category><![CDATA[Category Content]]></category>
		<category><![CDATA[Codebank]]></category>
		<category><![CDATA[Content Categories]]></category>
		<category><![CDATA[Content Description]]></category>
		<category><![CDATA[Content Title]]></category>
		<category><![CDATA[Description Text]]></category>
		<category><![CDATA[Echo Client]]></category>
		<category><![CDATA[Getresponse]]></category>
		<category><![CDATA[IXR]]></category>
		<category><![CDATA[Path]]></category>
		<category><![CDATA[Php Code]]></category>
		<category><![CDATA[Php File]]></category>
		<category><![CDATA[Quotes]]></category>
		<category><![CDATA[Target]]></category>

		<guid isPermaLink="false">http://www.blackhatdigest.com/?p=819</guid>
		<description><![CDATA[So if you are like many of the others out there struggling to automatically post to wordpress, I figured I&#8217;d give a little help today.  We&#8217;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&#8217;m to lazy [...]]]></description>
			<content:encoded><![CDATA[<p>So if you are like many of the others out there struggling to automatically post to wordpress, I figured I&#8217;d give a little help today.  We&#8217;ve gone into a lot more detail inside <a href="http://www.codebank.blackhatdigest.com" target="_blank">the codebank</a>, however, this should be enough to get anyone going.</p>
<p style="text-align: center;">(warning:  Wordpress does like to garble code and I&#8217;m to lazy to install a plugin to display it.  Watch out for quotes specifically)</p>
<p>// you have to include a path to a valid class-ixr.php file.  It&#8217;s included in every worpdress install.<br />
include_once(&#8216;/wp-includes/class-IXR.php&#8217;);</p>
<p>// if you aren&#8217;t working with multi site a blog id of zero is fine.</p>
<p>define(&#8216;BLOG_ID&#8217;, 0);</p>
<p>// blog username and password<br />
define(&#8216;RPC_USERNAME&#8217;, &#8216;yourusername&#8217;);<br />
define(&#8216;RPC_PASSWORD&#8217;, &#8216;yourpassword&#8217;);<br />
//  make sure the target blog has xml-rpc posting enabled under settings -&gt; writting</p>
<p>$client = new IXR_Client(&#8216;http://targetblog.com/xmlrpc.php&#8217;);</p>
<p>// O.k. we&#8217;ve got our client.</p>
<p>// what is our title, and the content of the post we want to send over.</p>
<div id="_mcePaste">$content['title'] = $title;</div>
<div id="_mcePaste">$content['categories'] = array($category);</div>
<div id="_mcePaste">$content['description'] =  $text;</div>
<div>// let&#8217;s post it&#8230;&#8230;. false means it posts as a draft.  True means it posts as a live post.</div>
<div id="_mcePaste">$client-&gt;query(&#8216;metaWeblog.newPost&#8217;, BLOG_ID, RPC_USERNAME, RPC_PASSWORD, $content, false);</div>
<div id="_mcePaste">echo $client-&gt;getResponse();</div>
<p>That&#8217;s it.  Just add in some error checking and go to town.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhatdigest.com/php-code-to-post-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Electronic Cigarette Affiliate Program</title>
		<link>http://www.blackhatdigest.com/electronic-cigarette-affiliate-program/</link>
		<comments>http://www.blackhatdigest.com/electronic-cigarette-affiliate-program/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 17:01:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Affiliate Center]]></category>
		<category><![CDATA[Affiliate Center Head]]></category>
		<category><![CDATA[Affiliate Link]]></category>
		<category><![CDATA[Affiliate Link Luci]]></category>
		<category><![CDATA[Affiliate Program]]></category>
		<category><![CDATA[America Smokes]]></category>
		<category><![CDATA[Batteries]]></category>
		<category><![CDATA[Center Head]]></category>
		<category><![CDATA[Cig]]></category>
		<category><![CDATA[Cigarette]]></category>
		<category><![CDATA[College Kids]]></category>
		<category><![CDATA[Conversions]]></category>
		<category><![CDATA[Crap]]></category>
		<category><![CDATA[Fda]]></category>
		<category><![CDATA[Feminine]]></category>
		<category><![CDATA[Flyers]]></category>
		<category><![CDATA[Job]]></category>
		<category><![CDATA[Jocks]]></category>
		<category><![CDATA[Lobbying Group]]></category>
		<category><![CDATA[Reseller]]></category>
		<category><![CDATA[Small Fortune]]></category>
		<category><![CDATA[Stock]]></category>

		<guid isPermaLink="false">http://www.blackhatdigest.com/?p=801</guid>
		<description><![CDATA[It&#8217;s been a few months since I mentioned e-cigs to my readers here.  I had stepped back a bit because I was &#8220;sure&#8221; the FDA was going to kill them before now.  With an actual lobbying group running, and the obvious benefits of using electronic cigs &#8211; well it&#8217;s time to be an affiliate if [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>It&#8217;s been a few months since I mentioned e-cigs to my readers here.  I had stepped back a bit because I was &#8220;sure&#8221; the FDA was going to kill them before now.  With an actual lobbying group running, and the obvious benefits of using electronic cigs &#8211; well it&#8217;s time to be an affiliate if you aren&#8217;t already.  If things keep going as well as they are I will be buying my own stock and distributing locally &#8211; that&#8217;s how good these sell.  And I do more locally than I do on-line.</p>
<p>The e-cig model is a great one, a nice payout on the initial sale, and then recurring income as they buy new cartridges, batteries, etc&#8230;  It&#8217;s recurring income with the ease of a one time sale.</p>
<p>Something like 25 percent of America Smokes &#8211; and a good portion of those are ladies.  I target them &#8211; and only them.  Why?  Well guys are different and eventually they stop using the cartridges and move on to more complicated (but cheaper) alternatives.  Women on the other hand don&#8217;t want to mess with vaping, or a bunch of techie crap  (maybe they are smarter than us).</p>
<p>That means I promote LUCI and just about nothing else.  They are based in the U.S., conversions are good, and the packaging is attractive (if a little feminine).</p>
<p>If you want to sign up to be an affiliate or a reseller here you go&#8230;. you can register from here.</p>
<p><a href="http://www.luciaffiliates.com/affiliates/signup.php?a_aid=7aba1be0">Resell or Affiliate Link</a></p>
<p>Luci is paying out on a regular basis.  Conversions are good.  Tracking appears stable.  I&#8217;ve created a resource site for E-cig affiliates here:  <a href="http://ecigaffiliatecenter.com" target="_blank">E-cig Affiliate Center</a>.  Head over there and opt in with the newsletter.  I&#8217;ll be sending you content, templates, tips, etc&#8230;</p>
<p>Make sure you are doing your job though and grabbing e-mails, and as much data as you can about the folks you are sending over.  I&#8217;ve got a sub affiliate who makes a small fortune because he bought a &#8220;local&#8221; domain, printed up flyers, and pays college kids to pass them out in bars.  (not nerdy kids but attractive jocks &#8211; seems to be important if you are targeting women for some reason).</p>
<p>Some of you may want to &#8220;TRY&#8221; these out before you promote them.  Since you aren&#8217;t supposed to order through your own affiliate link I&#8217;ve set one up for you with the lowest price available  (you get a few different affiliate urls with different price points).  <a href="http://promo.myluci.com/b/smokeless">http://promo.myluci.com/b/smokeless</a> &lt;&#8212; that link will let you try the starter kit out for less than $55.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhatdigest.com/electronic-cigarette-affiliate-program/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More WP Facebook Hacks.</title>
		<link>http://www.blackhatdigest.com/more-wp-facebook-hacks/</link>
		<comments>http://www.blackhatdigest.com/more-wp-facebook-hacks/#comments</comments>
		<pubDate>Tue, 11 May 2010 15:29:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Desc]]></category>
		<category><![CDATA[Div Tags]]></category>
		<category><![CDATA[Editor Php]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[H2]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Ul]]></category>
		<category><![CDATA[Usernames]]></category>
		<category><![CDATA[Wp]]></category>

		<guid isPermaLink="false">http://www.blackhatdigest.com/?p=748</guid>
		<description><![CDATA[Here is another little trick &#8211; 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: &#60;h2&#62; Who is New?&#60;/h2&#62; &#60;ul&#62; &#60;?php $usernames = $wpdb-&#62;get_results(&#8220;SELECT user_nicename, user_url [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">Here is another little trick &#8211; that might get more folks to log in your site and leave a comment with facebook.</div>
<div id="_mcePaste">Open up your theme editor in WP.  Find sidebar.php or sidebar2.php and just after the sidebar Div Tags add something like this:</div>
<div id="_mcePaste">&lt;h2&gt; Who is New?&lt;/h2&gt;</div>
<div id="_mcePaste">&lt;ul&gt;</div>
<div id="_mcePaste">&lt;?php $usernames = $wpdb-&gt;get_results(&#8220;SELECT user_nicename, user_url FROM $wpdb-&gt;users ORDER BY ID DESC LIMIT 5&#8243;);</div>
<div id="_mcePaste">foreach ($usernames as $username) {</div>
<div id="_mcePaste">echo &#8216;&lt;li&gt;&lt;a href=&#8221;&#8216;.$username- rel=&#8221;nofollow&#8221;&gt;user_url.&#8217;&#8221;&gt;&#8217;.$username-&gt;user_nicename.&#8221;&lt;/a&gt;&lt;/li&gt;&#8221;;</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">?&gt;</div>
<div id="_mcePaste">&lt;li&gt;&lt;p&gt;Want to be listed here? Log In and leave a comment with facebook&lt;/p&gt;&lt;/li&gt;</div>
<div id="_mcePaste">&lt;/ul&gt;</div>
<div id="_mcePaste">Of course you do need the plugin we talked about <a href="http://www.blackhatdigest.com/online-tools/check-it-out-facebook-forcing/" target="_self">here</a> or to have them register with your blog through WP&#8217;s normal log in procedure.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhatdigest.com/more-wp-facebook-hacks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hacked WordPress Blog?  Find and Replace in Mysql</title>
		<link>http://www.blackhatdigest.com/hacked-wordpress-blog-find-and-replace-in-mysql/</link>
		<comments>http://www.blackhatdigest.com/hacked-wordpress-blog-find-and-replace-in-mysql/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 18:10:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.blackhatdigest.com/?p=682</guid>
		<description><![CDATA[&#160;I just got done helping a client that had their WordPress Blog hacked into. &#160;Normally when a blog is hacked into the actual theme files are modified. &#160;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 [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;I just got done helping a client that had their WordPress Blog hacked into. &nbsp;Normally when a blog is hacked into the actual theme files are modified. &nbsp;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 through dreamweaver.</p>
<p>This time though it was the database that was fubared. &nbsp;Every single post had content injected into it. All 903 of them.</p>
<p>I&#8217;ve actually never run into this before so I figured it was worth at least a post since the fix was so easy.</p>
<p>So what I did was go into the phpmyadmin area. &nbsp;Select the database table and go to the sql tab.</p>
<p>Enter in something like this:</p>
<p>UPDATE `wp_posts` SET post_content = replace(post_content,&#8217;A COPY AND PASTE OF THE INJECTED TEXT&#8217;,&quot;&quot;)</p>
<p>That will &#8216;find&#8217; each instance of the injected text, and replace it with nothing at all. &nbsp;If I wanted to replace it with something about liking pie I would do this:</p>
<p>UPDATE `wp_posts` SET post_content = replace(post_content,&#8217;A COPY AND PASTE OF THE INJECTED TEXT&#8217;,'MAN O&#8217; &nbsp;MAN DO I LIKE PIE&#8217;)</p>
<p>So anyway I get finished, shoot off a little bill and start thinking (dangerous). &nbsp;I think on all my auto blogs I&#8217;m going to start injecting my own strange characters (or in this case ads). &nbsp;Down the road when I want to add something I won&#8217;t have to write a bot or use a plugin to do it.</p>
<p>In fact I&#8217;m going to start every post off with a non spacing break or something so I can go back in and add in other stuff (links, ads, code, etc..) at the top of all my posts.&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhatdigest.com/hacked-wordpress-blog-find-and-replace-in-mysql/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to make your own Twitter Poster in PHP with Curl</title>
		<link>http://www.blackhatdigest.com/how-to-make-your-own-twitter-poster-in-php-with-curl/</link>
		<comments>http://www.blackhatdigest.com/how-to-make-your-own-twitter-poster-in-php-with-curl/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 19:44:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[post to twitter php]]></category>

		<guid isPermaLink="false">http://www.blackhatdigest.com/?p=602</guid>
		<description><![CDATA[Twitter offers a handy dandy API for posting to itself.  It&#8217;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 &#8212; a day or so ago I provided the [...]]]></description>
			<content:encoded><![CDATA[<p>Twitter offers a handy dandy API for posting to itself.  It&#8217;s not hard to work with (you just have to organize your data the right way).</p>
<p>You need to have a few variables set up prior to running this.</p>
<p>$message  (what you are posting to twitter &#8212; a day or so ago I provided the code to make tinyurls)</p>
<p>$twitter_user =  Your twitter Username<br />
$twitter_password =  Your twitter password</p>
<p>If you have those three variables set you can call the code below and post to twitter with their api url and a wee bit of curl.  Here is the code to do it:</p>
<p>$twitter_api_url = &#8220;http://twitter.com/statuses/update.xml?status=&#8221;.urlencode(stripslashes(urldecode($message)));<br />
$twitter_data = $message;<br />
$ch = curl_init($twitter_api_url);<br />
curl_setopt($ch, CURLOPT_POST, 1);<br />
curl_setopt($ch, CURLOPT_POSTFIELDS, $twitter_data);<br />
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);<br />
curl_setopt($ch, CURLOPT_HEADER, 0);<br />
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />
curl_setopt($ch, CURLOPT_USERPWD, &#8220;{$twitter_user}:{$twitter_password}&#8221;);<br />
$twitter_data = curl_exec($ch);<br />
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);<br />
curl_close($ch);<br />
//Let&#8217;s print out where we posted and what!</p>
<p>echo &#8216;Posting Message: &#8216;.$message.&#8217;&lt;br&gt; to &lt;br&gt; http://www.twitter.com/&#8217;.$twitname.&#8221;;<br />
// Let&#8217;s print out an error message if things didn&#8217;t go well.<br />
if ($httpcode != 200) {<br />
echo &#8220;&lt;strong&gt;Don&#8217;t Panic!&lt;/strong&gt; Something went wrong, and the tweet wasn&#8217;t posted.  You Failed.&#8221;;<br />
}</p>
<p>That&#8217;s really it.  It will post your message to twitter.  You can store your variables in an array, or a database, or a text file.  Along with all your messages and have it go do it&#8217;s thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhatdigest.com/how-to-make-your-own-twitter-poster-in-php-with-curl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Convert Url to Tiny Url</title>
		<link>http://www.blackhatdigest.com/convert-url-to-tiny-url/</link>
		<comments>http://www.blackhatdigest.com/convert-url-to-tiny-url/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 14:17:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.blackhatdigest.com/?p=597</guid>
		<description><![CDATA[Sometimes 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(&#8220;http://tinyurl.com/api-create.php?url=&#8221; . $ToConvert); return $short_url; } [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes 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.</p>
<p>function ShortURL($ToConvert) {<br />
$short_url= file_get_contents(&#8220;http://tinyurl.com/api-create.php?url=&#8221; . $ToConvert);<br />
return $short_url;</p>
<p>}</p>
<p>Just call it with:</p>
<p>$newurl = ShortURL(&#8216;http://www.linktoshorten.com/itsreallylong&#8217;);</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhatdigest.com/convert-url-to-tiny-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random RSS Item with PHP and ICONV for formatting.</title>
		<link>http://www.blackhatdigest.com/random-rss-item-with-php-and-iconv-for-formatting/</link>
		<comments>http://www.blackhatdigest.com/random-rss-item-with-php-and-iconv-for-formatting/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 03:12:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[rss iconv]]></category>
		<category><![CDATA[rss parsing]]></category>
		<category><![CDATA[rss randomizing]]></category>

		<guid isPermaLink="false">http://www.blackhatdigest.com/?p=587</guid>
		<description><![CDATA[So 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 &#8211; skipping the most recent entry) function load_xml_feed($location) { global $value1; [...]]]></description>
			<content:encoded><![CDATA[<p>So 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.</p>
<p>(For example this snippet of code will return one random rss item from blackhatdigest &#8211; skipping the most recent entry)</p>
<p>function load_xml_feed($location)<br />
{<br />
global $value1;<br />
$feedXml = simplexml_load_file($location);</p>
<p>$i= &#8217;1&#8242;;<br />
foreach ($feedXml-&gt;channel-&gt;item as $article)<br />
{<br />
$title[$i] = (string)$article-&gt;title;<br />
$link[$i] = (string)$article-&gt;link;<br />
$description[$i] = (string)$article-&gt;description;</p>
<p>$i++;</p>
<p>}<br />
$randnumber = rand(2, $i);<br />
$link = trim($link[$randnumber]);<br />
$title = trim($title[$randnumber]);<br />
$description = trim($description[$randnumber]);<br />
$title = iconv(&#8220;UTF-8&#8243;, &#8220;ISO-8859-1&#8243;, $title);<br />
$description = iconv(&#8220;UTF-8&#8243;, &#8220;ISO-8859-1&#8243;, $description);<br />
$value1 = array($title,$link,$description);<br />
return $value1;<br />
}</p>
<p>$rss = &#8216;http://feeds.feedburner.com/BlackHatSeoDigest&#8217;;<br />
load_xml_feed($rss);<br />
$link = $value1[1];<br />
$title = $value1[0];<br />
$description = $value1[2];</p>
<p>echo $link;<br />
echo $title;<br />
echo $description;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhatdigest.com/random-rss-item-with-php-and-iconv-for-formatting/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  www.blackhatdigest.com/category/tutorials/feed/ ) in 0.80123 seconds, on Feb 8th, 2012 at 3:26 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 8th, 2012 at 4:26 pm UTC -->
