<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Spryt dot Com</title>
	
	<link>http://spryt.com</link>
	<description>Making Money Online, Blogging, SEO</description>
	<lastBuildDate>Wed, 04 Nov 2009 13:48:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/sprytcom" /><feedburner:info uri="sprytcom" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Twitter PHP scripts</title>
		<link>http://feedproxy.google.com/~r/sprytcom/~3/xHU94s2hPZs/</link>
		<comments>http://spryt.com/twitter-php-scripts/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 17:47:01 +0000</pubDate>
		<dc:creator>Spryt</dc:creator>
				<category><![CDATA[Scipts]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://spryt.com/?p=31</guid>
		<description><![CDATA[I&#8217;m a PHP programmer. No professional, but if I see the problem &#8211; I decide it. And Twitter &#8211; a new service for me, but some solution are not convenient for me. I learned the Twitter API to decide thise problems =)
API is very simple. Many operations can use simple HTTP request and XML report. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a PHP programmer. No professional, but if I see the problem &#8211; I decide it. And Twitter &#8211; a new service for me, but some solution are not convenient for me. I learned the <a href="http://apiwiki.twitter.com/Twitter-API-Documentation">Twitter API</a> to decide thise problems =)</p>
<p>API is very simple. Many operations can use simple HTTP request and XML report. Let&#8217;s get started:</p>
<p><strong>About User</strong><br />
This operation shows all about user. Name, url, bio, followers, friends and twits count, creation date, last status and other. You can make user preview, followers counter, etc. Example:</p>
<pre style="border: 1px gray dotted; padding: 5px; color: black; font-family: Verdana; font-size: 10pt; overflow: scroll;">
<code><font color="#000000">
<font color="#0000BB">&lt;?php
</font><font color="#007700">function&nbsp;</font><font color="#0000BB">get_user</font><font color="#007700">(</font><font color="#0000BB">$user</font><font color="#007700">,</font><font color="#0000BB">$is</font><font color="#007700">=</font><font color="#DD0000">"user"</font><font color="#007700">)&nbsp;{
if(</font><font color="#0000BB">$is</font><font color="#007700">==</font><font color="#DD0000">"user"</font><font color="#007700">)&nbsp;</font><font color="#0000BB">$content</font><font color="#007700">=</font><font color="#0000BB">file_get_contents</font><font color="#007700">(</font><font color="#DD0000">"http://twitter.com/users/show.xml?screen_name=$user"</font><font color="#007700">);
else&nbsp;if(</font><font color="#0000BB">$is</font><font color="#007700">==</font><font color="#DD0000">"id"</font><font color="#007700">)&nbsp;</font><font color="#0000BB">$content</font><font color="#007700">=</font><font color="#0000BB">file_get_contents</font><font color="#007700">(</font><font color="#DD0000">"http://twitter.com/users/show.xml?user_id=$user"</font><font color="#007700">);&nbsp;
</font><font color="#0000BB">preg_match_all</font><font color="#007700">(</font><font color="#DD0000">"/&lt;(.*)&gt;(.*)&lt;\/(.*)&gt;/"</font><font color="#007700">,&nbsp;</font><font color="#0000BB">$content</font><font color="#007700">,&nbsp;</font><font color="#0000BB">$id</font><font color="#007700">);&nbsp;
for(</font><font color="#0000BB">$i</font><font color="#007700">=</font><font color="#0000BB">0</font><font color="#007700">;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">&lt;</font><font color="#0000BB">count</font><font color="#007700">(</font><font color="#0000BB">$id</font><font color="#007700">[</font><font color="#0000BB">0</font><font color="#007700">]);&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">++){&nbsp;if(</font><font color="#0000BB">$i</font><font color="#007700">==</font><font color="#0000BB">15</font><font color="#007700">)&nbsp;{</font><font color="#0000BB">$k</font><font color="#007700">=</font><font color="#DD0000">"created"</font><font color="#007700">;}&nbsp;else&nbsp;{</font><font color="#0000BB">$k</font><font color="#007700">=</font><font color="#0000BB">$id</font><font color="#007700">[</font><font color="#0000BB">1</font><font color="#007700">][</font><font color="#0000BB">$i</font><font color="#007700">];}&nbsp;</font><font color="#0000BB">$arr</font><font color="#007700">[</font><font color="#0000BB">$k</font><font color="#007700">]=</font><font color="#0000BB">$id</font><font color="#007700">[</font><font color="#0000BB">2</font><font color="#007700">][</font><font color="#0000BB">$i</font><font color="#007700">];}&nbsp;
return&nbsp;</font><font color="#0000BB">$arr</font><font color="#007700">;}

</font><font color="#FF8000">//Example&nbsp;to&nbsp;counter:
</font><font color="#0000BB">$arr</font><font color="#007700">=</font><font color="#0000BB">get_user</font><font color="#007700">(</font><font color="#DD0000">"User"</font><font color="#007700">);
echo&nbsp;</font><font color="#DD0000">"Followers:&nbsp;$arr[followers_count]"</font><font color="#007700">;&nbsp;

</font><font color="#FF8000">//Example&nbsp;to&nbsp;preview:
</font><font color="#0000BB">$t</font><font color="#007700">=</font><font color="#0000BB">ceil</font><font color="#007700">((</font><font color="#0000BB">time</font><font color="#007700">()-</font><font color="#0000BB">strtotime</font><font color="#007700">(</font><font color="#0000BB">$arr</font><font color="#007700">[</font><font color="#0000BB">created</font><font color="#007700">]))/</font><font color="#0000BB">86400</font><font color="#007700">);
if&nbsp;(</font><font color="#0000BB">$arr</font><font color="#007700">[</font><font color="#0000BB">followers_count</font><font color="#007700">]!=</font><font color="#0000BB">0</font><font color="#007700">)&nbsp;{</font><font color="#0000BB">$ratio</font><font color="#007700">=</font><font color="#0000BB">round</font><font color="#007700">(</font><font color="#0000BB">$arr</font><font color="#007700">[</font><font color="#0000BB">friends_count</font><font color="#007700">]/</font><font color="#0000BB">$arr</font><font color="#007700">[</font><font color="#0000BB">followers_count</font><font color="#007700">],</font><font color="#0000BB">2</font><font color="#007700">);}&nbsp;else&nbsp;{</font><font color="#0000BB">$ratio</font><font color="#007700">=</font><font color="#DD0000">"-"</font><font color="#007700">;}
echo&nbsp;</font><font color="#DD0000">"&lt;table&nbsp;border=0&nbsp;width=900&nbsp;style=\"border:&nbsp;1px&nbsp;gray&nbsp;double;\"&gt;
&lt;tr&gt;&lt;td&nbsp;valign=top&gt;&lt;img&nbsp;src=\"$arr[profile_image_url]\"&nbsp;width=48&nbsp;height=48&gt;&nbsp;
&lt;td&nbsp;valign=top&gt;&lt;a&nbsp;href=\"http://twitter.com/$arr[screen_name]\"&gt;@$arr[screen_name]&lt;/a&gt;:&nbsp;
Ratio:&nbsp;$ratio&nbsp;-&nbsp;$arr[friends_count]&nbsp;|&nbsp;&lt;b&gt;$arr[followers_count]&lt;/b&gt;&nbsp;|&nbsp;Twits:&nbsp;$arr[statuses_count]&nbsp;|&nbsp;$t&nbsp;days
&lt;br&gt;$arr[description]&nbsp;(&lt;a&nbsp;href=\"$arr[url]\"&gt;$arr[url]&lt;/a&gt;)&lt;br&gt;
&lt;i&gt;$arr[text]&lt;/i&gt;&lt;br&gt;&lt;/table&gt;&lt;br&gt;"</font><font color="#007700">;
</font><font color="#0000BB">?&gt;</font>
</font>
</code></pre>
<p><strong>Followers and Friends</strong><br />
Get a follower and friends list of user (all who are not sealed off). Use to analysts.</p>
<pre style="border: 1px gray dotted; padding: 5px; color: black; font-family: Verdana; font-size: 10pt; overflow: scroll;">
<code><font color="#000000">
<font color="#0000BB">&lt;?php
</font><font color="#007700">function&nbsp;</font><font color="#0000BB">get_friends</font><font color="#007700">(</font><font color="#0000BB">$user</font><font color="#007700">,</font><font color="#0000BB">$is</font><font color="#007700">=</font><font color="#DD0000">"user"</font><font color="#007700">)&nbsp;{
if(</font><font color="#0000BB">$is</font><font color="#007700">==</font><font color="#DD0000">"user"</font><font color="#007700">)&nbsp;</font><font color="#0000BB">$content</font><font color="#007700">=</font><font color="#0000BB">file_get_contents</font><font color="#007700">(</font><font color="#DD0000">"http://twitter.com/friends/ids.xml?screen_name=$user"</font><font color="#007700">);
else&nbsp;if(</font><font color="#0000BB">$is</font><font color="#007700">==</font><font color="#DD0000">"id"</font><font color="#007700">)&nbsp;</font><font color="#0000BB">$content</font><font color="#007700">=</font><font color="#0000BB">file_get_contents</font><font color="#007700">(</font><font color="#DD0000">"http://twitter.com/friends/ids.xml?user_id=$user"</font><font color="#007700">);
</font><font color="#0000BB">preg_match_all</font><font color="#007700">(</font><font color="#DD0000">"/&lt;id&gt;(.*)&lt;\/id&gt;/"</font><font color="#007700">,&nbsp;</font><font color="#0000BB">$content</font><font color="#007700">,&nbsp;</font><font color="#0000BB">$ids</font><font color="#007700">);&nbsp;return&nbsp;</font><font color="#0000BB">$ids</font><font color="#007700">[</font><font color="#0000BB">1</font><font color="#007700">];}

function&nbsp;</font><font color="#0000BB">get_followers</font><font color="#007700">(</font><font color="#0000BB">$user</font><font color="#007700">,</font><font color="#0000BB">$is</font><font color="#007700">=</font><font color="#DD0000">"user"</font><font color="#007700">)&nbsp;{
if(</font><font color="#0000BB">$is</font><font color="#007700">==</font><font color="#DD0000">"user"</font><font color="#007700">)&nbsp;</font><font color="#0000BB">$content</font><font color="#007700">=</font><font color="#0000BB">file_get_contents</font><font color="#007700">(</font><font color="#DD0000">"http://twitter.com/followers/ids.xml?screen_name=$user"</font><font color="#007700">);
else&nbsp;if(</font><font color="#0000BB">$is</font><font color="#007700">==</font><font color="#DD0000">"id"</font><font color="#007700">)&nbsp;</font><font color="#0000BB">$content</font><font color="#007700">=</font><font color="#0000BB">file_get_contents</font><font color="#007700">(</font><font color="#DD0000">"http://twitter.com/followers/ids.xml?user_id=$user"</font><font color="#007700">);
</font><font color="#0000BB">preg_match_all</font><font color="#007700">(</font><font color="#DD0000">"/&lt;id&gt;(.*)&lt;\/id&gt;/"</font><font color="#007700">,&nbsp;</font><font color="#0000BB">$content</font><font color="#007700">,&nbsp;</font><font color="#0000BB">$ids</font><font color="#007700">);&nbsp;return&nbsp;</font><font color="#0000BB">$ids</font><font color="#007700">[</font><font color="#0000BB">1</font><font color="#007700">];}

</font><font color="#FF8000">//Example&nbsp;Friend&nbsp;of&nbsp;Follow
</font><font color="#0000BB">$name</font><font color="#007700">=</font><font color="#DD0000">"User"</font><font color="#007700">;
</font><font color="#0000BB">$fre</font><font color="#007700">=</font><font color="#0000BB">get_friends</font><font color="#007700">(</font><font color="#0000BB">$name</font><font color="#007700">);
</font><font color="#0000BB">$fol</font><font color="#007700">=</font><font color="#0000BB">get_followers</font><font color="#007700">(</font><font color="#0000BB">$name</font><font color="#007700">);
</font><font color="#0000BB">$friends</font><font color="#007700">=</font><font color="#0000BB">array_intersect</font><font color="#007700">(</font><font color="#0000BB">$fre</font><font color="#007700">,</font><font color="#0000BB">$fol</font><font color="#007700">);&nbsp;echo&nbsp;</font><font color="#0000BB">count</font><font color="#007700">(</font><font color="#0000BB">$friends</font><font color="#007700">).</font><font color="#DD0000">"&nbsp;Friends&nbsp;are&nbsp;following&nbsp;$name,&nbsp;and&nbsp;$name&nbsp;following&nbsp;them&nbsp;back&lt;br&gt;"</font><font color="#007700">;
</font><font color="#0000BB">$following</font><font color="#007700">=</font><font color="#0000BB">array_diff</font><font color="#007700">(</font><font color="#0000BB">$fre</font><font color="#007700">,</font><font color="#0000BB">$fol</font><font color="#007700">);&nbsp;echo&nbsp;</font><font color="#0000BB">count</font><font color="#007700">(</font><font color="#0000BB">$following</font><font color="#007700">).</font><font color="#DD0000">"&nbsp;Following&nbsp;by&nbsp;$name,&nbsp;but&nbsp;they're&nbsp;not&nbsp;following&nbsp;$name&nbsp;back&lt;br&gt;"</font><font color="#007700">;
</font><font color="#0000BB">$funs</font><font color="#007700">=</font><font color="#0000BB">array_diff</font><font color="#007700">(</font><font color="#0000BB">$fol</font><font color="#007700">,</font><font color="#0000BB">$fre</font><font color="#007700">);&nbsp;echo&nbsp;</font><font color="#0000BB">count</font><font color="#007700">(</font><font color="#0000BB">$funs</font><font color="#007700">).</font><font color="#DD0000">"&nbsp;Funs&nbsp;are&nbsp;following&nbsp;$name,&nbsp;but&nbsp;$name&nbsp;not&nbsp;following&nbsp;them&nbsp;back&lt;br&gt;"</font><font color="#007700">;

foreach&nbsp;(</font><font color="#0000BB">$friends&nbsp;</font><font color="#007700">as&nbsp;</font><font color="#0000BB">$v</font><font color="#007700">)&nbsp;{</font><font color="#0000BB">$arr</font><font color="#007700">=</font><font color="#0000BB">get_user</font><font color="#007700">(</font><font color="#0000BB">$v</font><font color="#007700">,</font><font color="#DD0000">"id"</font><font color="#007700">);&nbsp;echo&nbsp;</font><font color="#DD0000">"$arr[screen_name]&nbsp;|"</font><font color="#007700">;}&nbsp;</font><font color="#FF8000">//Print&nbsp;names&nbsp;of&nbsp;friends
</font><font color="#0000BB">?&gt;</font>
</font>
</code></pre>
<p><strong>Follow and UnFollow</strong><br />
It&#8217;s automatize follow. Need authorize, curl.</p>
<pre style="border: 1px gray dotted; padding: 5px; color: black; font-family: Verdana; font-size: 10pt; overflow: scroll;">
<code><font color="#000000">
<font color="#0000BB">&lt;?php
</font><font color="#007700">function&nbsp;</font><font color="#0000BB">friendship</font><font color="#007700">(</font><font color="#0000BB">$username</font><font color="#007700">,&nbsp;</font><font color="#0000BB">$password</font><font color="#007700">,&nbsp;</font><font color="#0000BB">$twiname</font><font color="#007700">,</font><font color="#0000BB">$do</font><font color="#007700">){
if&nbsp;(</font><font color="#0000BB">$do</font><font color="#007700">==</font><font color="#DD0000">"follow"</font><font color="#007700">)&nbsp;{</font><font color="#0000BB">$url&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#DD0000">"http://twitter.com/friendships/create/{$twiname}.xml"</font><font color="#007700">;}
else&nbsp;if&nbsp;(</font><font color="#0000BB">$do</font><font color="#007700">==</font><font color="#DD0000">"unfollow"</font><font color="#007700">)&nbsp;{</font><font color="#0000BB">$url&nbsp;</font><font color="#007700">=</font><font color="#DD0000">"http://twitter.com/friendships/destroy/{$twiname}.xml"</font><font color="#007700">;}
</font><font color="#0000BB">$c&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000BB">curl_init</font><font color="#007700">();
</font><font color="#0000BB">curl_setopt</font><font color="#007700">(</font><font color="#0000BB">$c</font><font color="#007700">,&nbsp;</font><font color="#0000BB">CURLOPT_URL</font><font color="#007700">,&nbsp;</font><font color="#DD0000">"$url"</font><font color="#007700">);
</font><font color="#0000BB">curl_setopt</font><font color="#007700">(</font><font color="#0000BB">$c</font><font color="#007700">,&nbsp;</font><font color="#0000BB">CURLOPT_CONNECTTIMEOUT</font><font color="#007700">,&nbsp;</font><font color="#0000BB">2</font><font color="#007700">);
</font><font color="#0000BB">curl_setopt</font><font color="#007700">(</font><font color="#0000BB">$c</font><font color="#007700">,&nbsp;</font><font color="#0000BB">CURLOPT_RETURNTRANSFER</font><font color="#007700">,&nbsp;</font><font color="#0000BB">1</font><font color="#007700">);
</font><font color="#0000BB">curl_setopt</font><font color="#007700">(</font><font color="#0000BB">$c</font><font color="#007700">,&nbsp;</font><font color="#0000BB">CURLOPT_POST</font><font color="#007700">,&nbsp;</font><font color="#0000BB">1</font><font color="#007700">);
</font><font color="#0000BB">curl_setopt</font><font color="#007700">(</font><font color="#0000BB">$c</font><font color="#007700">,&nbsp;</font><font color="#0000BB">CURLOPT_USERPWD</font><font color="#007700">,&nbsp;</font><font color="#DD0000">"$username:$password"</font><font color="#007700">);
</font><font color="#0000BB">$content&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000BB">curl_exec</font><font color="#007700">(</font><font color="#0000BB">$c</font><font color="#007700">);
</font><font color="#0000BB">curl_close</font><font color="#007700">(</font><font color="#0000BB">$c</font><font color="#007700">);
</font><font color="#0000BB">preg_match</font><font color="#007700">(</font><font color="#DD0000">"/&lt;following&gt;(.*)&lt;\/following&gt;/"</font><font color="#007700">,&nbsp;</font><font color="#0000BB">$content</font><font color="#007700">,&nbsp;</font><font color="#0000BB">$ids</font><font color="#007700">);
return&nbsp;</font><font color="#0000BB">$ids</font><font color="#007700">[</font><font color="#0000BB">1</font><font color="#007700">];}

</font><font color="#FF8000">//Example:
</font><font color="#0000BB">friendship</font><font color="#007700">(</font><font color="#DD0000">"User(you)"</font><font color="#007700">,</font><font color="#DD0000">"password"</font><font color="#007700">,</font><font color="#DD0000">"WhereFollow"</font><font color="#007700">,</font><font color="#DD0000">"follow"</font><font color="#007700">);

</font><font color="#FF8000">//Follow&nbsp;all,&nbsp;who&nbsp;following&nbsp;you
</font><font color="#0000BB">$name</font><font color="#007700">=</font><font color="#DD0000">"User"</font><font color="#007700">;&nbsp;</font><font color="#0000BB">$pass</font><font color="#007700">=</font><font color="#DD0000">"password"</font><font color="#007700">;
</font><font color="#0000BB">$fre</font><font color="#007700">=</font><font color="#0000BB">get_friends</font><font color="#007700">(</font><font color="#0000BB">$name</font><font color="#007700">);&nbsp;</font><font color="#0000BB">$fol</font><font color="#007700">=</font><font color="#0000BB">get_followers</font><font color="#007700">(</font><font color="#0000BB">$name</font><font color="#007700">);
</font><font color="#0000BB">$funs</font><font color="#007700">=</font><font color="#0000BB">array_diff</font><font color="#007700">(</font><font color="#0000BB">$fre</font><font color="#007700">,</font><font color="#0000BB">$fol</font><font color="#007700">);

foreach&nbsp;(</font><font color="#0000BB">$funs&nbsp;</font><font color="#007700">as&nbsp;</font><font color="#0000BB">$v</font><font color="#007700">)&nbsp;{echo&nbsp;</font><font color="#DD0000">"$v:&nbsp;"</font><font color="#007700">.</font><font color="#0000BB">friendship</font><font color="#007700">(</font><font color="#0000BB">$name</font><font color="#007700">,</font><font color="#0000BB">$pass</font><font color="#007700">,</font><font color="#0000BB">$v</font><font color="#007700">,</font><font color="#DD0000">"follow"</font><font color="#007700">).</font><font color="#DD0000">",&nbsp;"</font><font color="#007700">;&nbsp;</font><font color="#0000BB">sleep</font><font color="#007700">(</font><font color="#0000BB">1</font><font color="#007700">);}
echo&nbsp;</font><font color="#DD0000">"&nbsp;followed&nbsp;("</font><font color="#007700">.</font><font color="#0000BB">count</font><font color="#007700">(</font><font color="#0000BB">$funs</font><font color="#007700">).</font><font color="#DD0000">")"</font><font color="#007700">;

</font><font color="#FF8000">//Unfollow&nbsp;All,&nbsp;who&nbsp;don't&nbsp;follow&nbsp;you:
</font><font color="#0000BB">$name</font><font color="#007700">=</font><font color="#DD0000">"User"</font><font color="#007700">;&nbsp;</font><font color="#0000BB">$pass</font><font color="#007700">=</font><font color="#DD0000">"password"</font><font color="#007700">;
</font><font color="#0000BB">$fre</font><font color="#007700">=</font><font color="#0000BB">get_friends</font><font color="#007700">(</font><font color="#0000BB">$name</font><font color="#007700">);&nbsp;</font><font color="#0000BB">$fol</font><font color="#007700">=</font><font color="#0000BB">get_followers</font><font color="#007700">(</font><font color="#0000BB">$name</font><font color="#007700">);
</font><font color="#0000BB">$following</font><font color="#007700">=</font><font color="#0000BB">array_diff</font><font color="#007700">(</font><font color="#0000BB">$fre</font><font color="#007700">,</font><font color="#0000BB">$fol</font><font color="#007700">);

foreach&nbsp;(</font><font color="#0000BB">$following&nbsp;</font><font color="#007700">as&nbsp;</font><font color="#0000BB">$v</font><font color="#007700">)&nbsp;{echo&nbsp;</font><font color="#DD0000">"$v:&nbsp;"</font><font color="#007700">.</font><font color="#0000BB">friendship</font><font color="#007700">(</font><font color="#0000BB">$name</font><font color="#007700">,</font><font color="#0000BB">$pass</font><font color="#007700">,</font><font color="#0000BB">$v</font><font color="#007700">,</font><font color="#DD0000">"unfollow"</font><font color="#007700">).</font><font color="#DD0000">",&nbsp;"</font><font color="#007700">;&nbsp;</font><font color="#0000BB">sleep</font><font color="#007700">(</font><font color="#0000BB">1</font><font color="#007700">);}
echo&nbsp;</font><font color="#DD0000">"&nbsp;unfollowed&nbsp;("</font><font color="#007700">.</font><font color="#0000BB">count</font><font color="#007700">(</font><font color="#0000BB">$following</font><font color="#007700">).</font><font color="#DD0000">")"</font><font color="#007700">;

</font><font color="#FF8000">//Follow&nbsp;all,&nbsp;who&nbsp;following&nbsp;Other&nbsp;user:
</font><font color="#0000BB">$user</font><font color="#007700">=</font><font color="#DD0000">"FollowHisFriends"</font><font color="#007700">;
</font><font color="#0000BB">$name</font><font color="#007700">=</font><font color="#DD0000">"User"</font><font color="#007700">;&nbsp;</font><font color="#0000BB">$pass</font><font color="#007700">=</font><font color="#DD0000">"password"</font><font color="#007700">;
</font><font color="#0000BB">$fre</font><font color="#007700">=</font><font color="#0000BB">get_friends_user</font><font color="#007700">(</font><font color="#0000BB">$name</font><font color="#007700">)
</font><font color="#0000BB">$fre2</font><font color="#007700">=</font><font color="#0000BB">get_friends_user</font><font color="#007700">(</font><font color="#0000BB">$user</font><font color="#007700">);&nbsp;

</font><font color="#0000BB">$difre</font><font color="#007700">=</font><font color="#0000BB">array_diff</font><font color="#007700">(</font><font color="#0000BB">$fre2</font><font color="#007700">,</font><font color="#0000BB">$fre</font><font color="#007700">);&nbsp;</font><font color="#FF8000">//Who&nbsp;follow&nbsp;User,&nbsp;but&nbsp;not&nbsp;following&nbsp;you

</font><font color="#007700">foreach&nbsp;(</font><font color="#0000BB">$difre&nbsp;</font><font color="#007700">as&nbsp;</font><font color="#0000BB">$v</font><font color="#007700">)&nbsp;&nbsp;{echo&nbsp;</font><font color="#DD0000">"$v:&nbsp;"</font><font color="#007700">.</font><font color="#0000BB">friendship</font><font color="#007700">(</font><font color="#0000BB">$name</font><font color="#007700">,</font><font color="#0000BB">$pass</font><font color="#007700">,</font><font color="#0000BB">$v</font><font color="#007700">,</font><font color="#DD0000">"follow"</font><font color="#007700">).</font><font color="#DD0000">",&nbsp;"</font><font color="#007700">;&nbsp;</font><font color="#0000BB">sleep</font><font color="#007700">(</font><font color="#0000BB">1</font><font color="#007700">);}
echo&nbsp;</font><font color="#DD0000">"&nbsp;followed&nbsp;("</font><font color="#007700">.</font><font color="#0000BB">count</font><font color="#007700">(</font><font color="#0000BB">$difre</font><font color="#007700">).</font><font color="#DD0000">")"</font><font color="#007700">;
</font><font color="#0000BB">?&gt;</font>
</font>
</code></pre>
<p><strong>Limits</strong><br />
Request per hour &#8211; 150. Use many IP&#8217;s for more request.<br />
Follow limit &#8211; 2000 OR 110% of your followers. </p>
<p><strong>Usage</strong><br />
Use your own scripts to manage your Twitter Account &#8211; it&#8217;s free and full control. Use cron to automatic follow user, who following you. Create individual widgets, counter, previews and other &#8211; for great view on your blog. But.. don&#8217;t be evil &#8211; no spam, please. </p>
<p>Interesting? Subscribe on my <a href="http://feeds.feedburner.com/sprytcom">RSS Feed</a> and follow me on <a href="http://twitter.com/Sprytcom">Twitter</a>!</p>
<img src="http://feeds.feedburner.com/~r/sprytcom/~4/xHU94s2hPZs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://spryt.com/twitter-php-scripts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://spryt.com/twitter-php-scripts/</feedburner:origLink></item>
		<item>
		<title>October results</title>
		<link>http://feedproxy.google.com/~r/sprytcom/~3/87mrVZC4oE0/</link>
		<comments>http://spryt.com/october-results/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 15:26:18 +0000</pubDate>
		<dc:creator>Spryt</dc:creator>
				<category><![CDATA[Results]]></category>

		<guid isPermaLink="false">http://spryt.com/?p=26</guid>
		<description><![CDATA[In my russian blog I write every month results, including earnings. This is a good idea &#8211; archive history, and it shows my readers what I do (2,5, I write them). If I tell people about making money, where is my results?) So, I continue this tradition.
In October my total profit is $800. Including:
Sale Links: [...]]]></description>
			<content:encoded><![CDATA[<p>In my russian blog I write every month results, including earnings. This is a good idea &#8211; archive history, and it shows my readers what I do (2,5, I write them). If I tell people about making money, where is my results?) So, I continue this tradition.</p>
<p>In October my total profit is <b>$800</b>. Including:</p>
<p>Sale Links: 300$<br />
Referial earnings: 220$<br />
Media ads: 170$<br />
AdSense: 28$ (two weeks work)<br />
..and little money in other ways.</p>
<p>Of course, all of this &#8211; in russian-speaking internet. In English Internet I did not earn) And my first goal &#8211; increase profit in this direction. At this time I have one blog (this), and some ideas for sites and service (in twitter).  </p>
<p>Blog stats are very small. I have ~10 <a href="http://feeds.feedburner.com/sprytcom">RSS</a> readers and 35 followers in <a href="http://twitter.com/Sprytcom">Twitter</a>, three posts and two comments. Unique visitors &#8211; 184, but only 16 &#8211; in USA. Alexa rank is 11M =) In November I&#8217;ll try promote my blog and twitter (for it&#8217;s very interesting for me).</p>
<p>And how much you earned online in October?)</p>
<img src="http://feeds.feedburner.com/~r/sprytcom/~4/87mrVZC4oE0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://spryt.com/october-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://spryt.com/october-results/</feedburner:origLink></item>
		<item>
		<title>Choosing a site niche</title>
		<link>http://feedproxy.google.com/~r/sprytcom/~3/se-paeNoLPk/</link>
		<comments>http://spryt.com/choosing-a-site-niche/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 20:57:18 +0000</pubDate>
		<dc:creator>Spryt</dc:creator>
				<category><![CDATA[Sites]]></category>

		<guid isPermaLink="false">http://spryt.com/?p=17</guid>
		<description><![CDATA[Choosing subjects of future site is very important. You can choose no one needed a niche, and your site will be doomed to failure. You can choose the contrary, the too niche, and you&#8217;ll be overwhelmed with tons of competitors. Even if you did everything correctly, the site is, the attendance good .. But it [...]]]></description>
			<content:encoded><![CDATA[<p>Choosing subjects of future site is very important. You can choose no one needed a niche, and your site will be doomed to failure. You can choose the contrary, the too niche, and you&#8217;ll be overwhelmed with tons of competitors. Even if you did everything correctly, the site is, the attendance good .. But it may fail in monetization, and you can not normally earning on site &#8211; as chosen niche is economically unprofitable. Therefore, we must carefully select the theme of the site. What you should pay attention: </p>
<p><strong>Your interest </strong><br />
It will be much better if you yourself would be interested in this niche. In this case, you and you know what information must be on the site, whom it will be interesting, etc. If you still do not know what you want &#8211; make a note on the paper everything that you&#8217;re interested in (from stamp collecting and ending with iPhone), and gradually forget to remove not suitable niches. Thus you will come to some ideas that can be implemented. </p>
<p><strong>The interest of users </strong><br />
Remove rare subjects. Etymology of ancient Egyptian &#8211; this is certainly interesting, but completely wasted. Try google information on selected topics, if the activity is (a normal page in wikipedia, websites, discussion, etc.) &#8211; means you can use. </p>
<p><strong>Monetization </strong><br />
The goal is not to simply create a website. It is necessary to receive money from the site.. It&#8217;s time to check how it would be advantageous. Check the price of clicks in <a href="https://adwords.google.com/select/KeywordToolExternal">AdWords</a>, as well as the presence of advertisers. If your site is about something that you can sell &#8211; well, then you can use affiliate sales. A lot of the price information? That means you can sell ebooks and manuals. Just think about how you can earn with your site. </p>
<p><strong>Competition </strong><br />
It&#8217;s time to descend from heaven to earth to check competitors. Google for this irreplaceable &#8211; check the number of pages per issue in the main and secondary keywords, as well as sites in Top. Can you compete with them? If not, try a more narrow niche. Start with small, and gradually you can move your competitors and take their rightful place </p>
<p><strong>PROFIT! </strong><br />
Chose a niche? It&#8217;s time to start creating a website =) This is in the following post.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p><a href="http://myblog2day.com/">Lee Ka Hoong</a> told about <a href="http://myblog2day.com/3-ways-to-make-money-online-with-web-hosting-affiliate-program.php">Make Money Online With Web Hosting Affiliate Program</a>. This is interested idea, although it is not new.</p>
<p><a href="http://earningstep.com/">Jeandsen than</a> told about 10 myths in adsense &#8211; <a href="http://www.earningstep.com/best-tips/adsense-tips/ten-myths-you-must-know-about-google-adsense-–-reveal-the-secret-of-google-adsense-part-one/">Part 1</a> and <a href="http://www.earningstep.com/best-tips/adsense-tips/ten-myths-you-must-know-about-google-adsense-–-reveal-the-secret-of-google-adsense-part-two/">Part 2</a>. 	This is the question of monetization &#8211; not all niches are equally good.</p>
<p>PS. If you find a spelling error &#8211; let me know (Thanks, Google Translate).</p>
<img src="http://feeds.feedburner.com/~r/sprytcom/~4/se-paeNoLPk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://spryt.com/choosing-a-site-niche/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://spryt.com/choosing-a-site-niche/</feedburner:origLink></item>
		<item>
		<title>Welcome to my Blog</title>
		<link>http://feedproxy.google.com/~r/sprytcom/~3/OOxM-Jezxt8/</link>
		<comments>http://spryt.com/welocome-to-my-blog/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 19:54:08 +0000</pubDate>
		<dc:creator>Spryt</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[About me]]></category>

		<guid isPermaLink="false">http://spryt.com/?p=7</guid>
		<description><![CDATA[ Hello! My nickname is Spryt. I&#8217;m from Russia, and I&#8217;m 19 years old. I earn money on the internet (russian-speaking internet, runet). And now I&#8217;m interested in earnings in the english-speaking internet. Also, in runet I have a mid-popular blog (1300 readers) about making money online (SEO, experiments, blogging, etc.), and this blog &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://giatsintov.ru/wp-content/uploads/2009/10/avatar_line.jpg" width=109 height=160 border=0 align=left style="padding-right: 5px; "> Hello! My nickname is Spryt. I&#8217;m from Russia, and I&#8217;m 19 years old. I earn money on the internet (russian-speaking internet, runet). And now I&#8217;m interested in earnings in the english-speaking internet. Also, in runet I have a mid-popular blog (1300 readers) about making money online (SEO, experiments, blogging, etc.), and this blog &#8211; an adaptation for the english-speaking internet.</p>
<p>My goal &#8211; to increase my earnings. Now I earn about 1000 $ per month, mostly in runet &#8211; selling links and banners on my sites, referial earnings and other. That is quite enough to live in Russia, but it is not enough for beautiful life =) And as for life in another country. I started with the creating of websites (including this blog), for their subsequent monetization in Google AdSense. This is what I&#8217;m going to write in this blog &#8211; about earning money online without offline work.</p>
<p>And, my english is very bad, sorry. However, Google Translate and friends help me in this issue =) Another goal &#8211; learning english (I know a little language, but not enough to free communication). If you find a spelling error &#8211; please let me know (in comments).</p>
<p>Hmm.. That is it!</p>
<img src="http://feeds.feedburner.com/~r/sprytcom/~4/OOxM-Jezxt8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://spryt.com/welocome-to-my-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://spryt.com/welocome-to-my-blog/</feedburner:origLink></item>
	</channel>
</rss>
