<?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>BncApps</title>
	
	<link>http://bncapps.com</link>
	<description>Open Source Applications and General Technology Blog</description>
	<lastBuildDate>Sat, 12 Dec 2009 21:15:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</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/Bncapps" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Three New Play-Asia Coupons!</title>
		<link>http://feedproxy.google.com/~r/Bncapps/~3/1rDGsH1UREU/</link>
		<comments>http://bncapps.com/three-new-play-asia-coupons/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 17:46:22 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[free play asia coupon]]></category>

		<guid isPermaLink="false">http://bncapps.com/three-new-play-asia-coupons/</guid>
		<description><![CDATA[I got ahold of 3 new play-Asia.com coupons, each one is one use only.
First one: CM-EQZ-LNE
This is for $5 off of orders $50 or more 
The next two:
]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/0ZdiDZaTwEcotVrbWaaciPr4P-w/0/da"><img src="http://feedads.g.doubleclick.net/~a/0ZdiDZaTwEcotVrbWaaciPr4P-w/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/0ZdiDZaTwEcotVrbWaaciPr4P-w/1/da"><img src="http://feedads.g.doubleclick.net/~a/0ZdiDZaTwEcotVrbWaaciPr4P-w/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fbncapps.com%2Fthree-new-play-asia-coupons%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fbncapps.com%2Fthree-new-play-asia-coupons%2F" height="61" width="51" /></a></div><p>I got ahold of 3 new play-Asia.com coupons, each one is one use only.<br />
First one: CM-EQZ-LNE<br />
This is for $5 off of orders $50 or more </p>
<p>The next two:</p>
<p><a href=http://bncapps.com/wp-content/uploads/2009/12/p_480_320_67F6F806-9711-4D72-877A-207E478B3020.jpeg <img src=http://bncapps.com/wp-content/uploads/2009/12/p_480_320_67F6F806-9711-4D72-877A-207E478B3020.jpeg alt= width=200 height=300 class=alignnone size-full wp-image-364</img></a>
<div align="left"><font size="2">Twitter Poster plugin : <a href="http://pregnancy2dot0.com/2009/11/try-our-conception-calendar/">Pregnancy Calendar</a></font></div>
<img src="http://feeds.feedburner.com/~r/Bncapps/~4/1rDGsH1UREU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bncapps.com/three-new-play-asia-coupons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://bncapps.com/three-new-play-asia-coupons/</feedburner:origLink></item>
		<item>
		<title>Bncapps has hit One year!</title>
		<link>http://feedproxy.google.com/~r/Bncapps/~3/Ja7UbV-2LWY/</link>
		<comments>http://bncapps.com/bncapps-has-hit-one-year/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 14:04:37 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://bncapps.com/?p=517</guid>
		<description><![CDATA[Today marks one whole year since Bncapps.com has launched. Throughout this time we gained 82 posts, not as much as I would have liked but I hope to try and get more up soon!
]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/cqdA-QAJ3WB7UwmFXgqvlt4gVco/0/da"><img src="http://feedads.g.doubleclick.net/~a/cqdA-QAJ3WB7UwmFXgqvlt4gVco/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/cqdA-QAJ3WB7UwmFXgqvlt4gVco/1/da"><img src="http://feedads.g.doubleclick.net/~a/cqdA-QAJ3WB7UwmFXgqvlt4gVco/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fbncapps.com%2Fbncapps-has-hit-one-year%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fbncapps.com%2Fbncapps-has-hit-one-year%2F" height="61" width="51" /></a></div><p>Today marks one whole year since Bncapps.com has launched. Throughout this time we gained 82 posts, not as much as I would have liked but I hope to try and get more up soon!</p>
<img src="http://feeds.feedburner.com/~r/Bncapps/~4/Ja7UbV-2LWY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bncapps.com/bncapps-has-hit-one-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://bncapps.com/bncapps-has-hit-one-year/</feedburner:origLink></item>
		<item>
		<title>Twitter API – Creating lists with PHP and cURL</title>
		<link>http://feedproxy.google.com/~r/Bncapps/~3/U7f53Ff3wSA/</link>
		<comments>http://bncapps.com/twitter-api-creating-lists-with-php-and-curl/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 13:33:50 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bncapps.com/?p=508</guid>
		<description><![CDATA[I needed to be able to create Twitter lists for my Tweet Large project. So, here is a method i made to do this. It is in PHP and requires the cURL library. Simply pass the new list name, as well as the username and password and the list will be created.
&#160;
public function createList&#40;$listname='', $username='', [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/CFXKCQguFtyeZsRzH1mDeUtCIsk/0/da"><img src="http://feedads.g.doubleclick.net/~a/CFXKCQguFtyeZsRzH1mDeUtCIsk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/CFXKCQguFtyeZsRzH1mDeUtCIsk/1/da"><img src="http://feedads.g.doubleclick.net/~a/CFXKCQguFtyeZsRzH1mDeUtCIsk/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fbncapps.com%2Ftwitter-api-creating-lists-with-php-and-curl%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fbncapps.com%2Ftwitter-api-creating-lists-with-php-and-curl%2F" height="61" width="51" /></a></div><p>I needed to be able to create Twitter lists for my <a href="http://bncapps.com/tweetlarge-current-project/">Tweet Large</a> project. So, here is a method i made to do this. It is in PHP and requires the cURL library. Simply pass the new list name, as well as the username and password and the list will be created.</p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> createList<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$listname</span>=<span style="color: #ff0000;">''</span>, <span style="color: #0000ff;">$username</span>=<span style="color: #ff0000;">''</span>, <span style="color: #0000ff;">$password</span>=<span style="color: #ff0000;">''</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$listname</span><span style="color: #66cc66;">&#41;</span> &amp;&amp; !<a href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$username</span><span style="color: #66cc66;">&#41;</span> &amp;&amp; !<a href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$password</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
<span style="color: #0000ff;">$url</span> = <span style="color: #ff0000;">'http://api.twitter.com/1/'</span>.<span style="color: #0000ff;">$username</span>.<span style="color: #ff0000;">'/lists.xml'</span>;
<span style="color: #0000ff;">$curl_handle</span> = curl_init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
curl_setopt<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$curl_handle</span>, CURLOPT_URL, <span style="color: #ff0000;">&quot;$url&quot;</span><span style="color: #66cc66;">&#41;</span>;
curl_setopt<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$curl_handle</span>, CURLOPT_CONNECTTIMEOUT, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
curl_setopt<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$curl_handle</span>, CURLOPT_RETURNTRANSFER, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
curl_setopt<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$curl_handle</span>, CURLOPT_POST, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
curl_setopt<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$curl_handle</span>, CURLOPT_POSTFIELDS, <span style="color: #ff0000;">&quot;name=$listname&quot;</span><span style="color: #66cc66;">&#41;</span>;
curl_setopt<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$curl_handle</span>, CURLOPT_USERPWD, <span style="color: #0000ff;">$username</span>.<span style="color: #ff0000;">&quot;:&quot;</span>.<span style="color: #0000ff;">$password</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0000ff;">$buffer</span> = curl_exec<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$curl_handle</span><span style="color: #66cc66;">&#41;</span>;
curl_close<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$curl_handle</span><span style="color: #66cc66;">&#41;</span>;
   <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<img src="http://feeds.feedburner.com/~r/Bncapps/~4/U7f53Ff3wSA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bncapps.com/twitter-api-creating-lists-with-php-and-curl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://bncapps.com/twitter-api-creating-lists-with-php-and-curl/</feedburner:origLink></item>
		<item>
		<title>TweetLarge – Current Project</title>
		<link>http://feedproxy.google.com/~r/Bncapps/~3/aEsB1jbX2BM/</link>
		<comments>http://bncapps.com/tweetlarge-current-project/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 02:20:46 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[twitter followers]]></category>

		<guid isPermaLink="false">http://bncapps.com/?p=506</guid>
		<description><![CDATA[First of all, I am sorry for this being the only post within TWO months! Here is the story:
Over the past 2 months, and for the next little while I have been working on a project with a team. The site is Twitter based and its purpose is to give you free Twitter followers.
The front [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/kghTa1mXTIAg7-G4KUN_O90gDKE/0/da"><img src="http://feedads.g.doubleclick.net/~a/kghTa1mXTIAg7-G4KUN_O90gDKE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/kghTa1mXTIAg7-G4KUN_O90gDKE/1/da"><img src="http://feedads.g.doubleclick.net/~a/kghTa1mXTIAg7-G4KUN_O90gDKE/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fbncapps.com%2Ftweetlarge-current-project%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fbncapps.com%2Ftweetlarge-current-project%2F" height="61" width="51" /></a></div><p>First of all, I am sorry for this being the only post within TWO months! Here is the story:</p>
<p>Over the past 2 months, and for the next little while I have been working on a project with a team. The site is Twitter based and its purpose is to give you free <a href="http://tweetlarge.com?id=2">Twitter followers</a>.</p>
<p>The front end is simple, complete the three steps: Login, choose a Tweet, and send. Each Tweet you send will score you 100 followers. You can do this up to 10 times. After this time, you can still Tweet to enter the lottery. Each Tweet gives you one entry into the lottery, you can join once per hour. There are 6 prizes given out daily, with the top prize being 500 followers!</p>
<p>The back end is not so simple looking as the front end. Since this is a programming site I will go into some detail of how the core works, but I can not provide any code examples.</p>
<p>When you request for your followers, you are added to a job quene. This script is load balanced and there are 3 servers that check the quene. If they see a new job to process, and the job is 5 minutes old it will take it and mark it as being in process. When the job runs, it will validate that you have the Tweet still on your Twitter page. If not, it will send you an @reply notifying you. (I will post up a guide on Tweeting through PHP real soon - I was sure I had already done so, but apparently not)</p>
<p>It would then cycle through our accounts and follow you, ensuring that you get the exact number of followers you deserve. If while following you our system detects any of our accounts as being inactive, we will credit everybody who that account followed. This way you are guaranteed the right number of followers, and wont suffer a loss.</p>
<p>Our servers also run a validation script to clean up the dead accounts from our database, this is run while there are no following jobs active. See <a href="http://bncapps.com/php-verifying-twitter-credentials-using-fsock/">Verifying Twitter Credentials In PHP</a>.</p>
<p>Well thats all for now. So why dont you go ahead and <a href="http://tweetlarge.com?id=2">Get Twitter followers</a>.</p>
<p><a href="http://www.TweetLarge.com?id=2">http://TweetLarge.com</a></p>
<img src="http://feeds.feedburner.com/~r/Bncapps/~4/aEsB1jbX2BM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bncapps.com/tweetlarge-current-project/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://bncapps.com/tweetlarge-current-project/</feedburner:origLink></item>
		<item>
		<title>Lockerz.com – Free Stuff!</title>
		<link>http://feedproxy.google.com/~r/Bncapps/~3/8wp2HKvx4Sw/</link>
		<comments>http://bncapps.com/lockerz-com-free-stuff/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 19:51:34 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[free stuff]]></category>

		<guid isPermaLink="false">http://bncapps.com/?p=501</guid>
		<description><![CDATA[Lockerz.com is a site where you can get free stuff, such as iPods, PS3's, cases, etc. After a day I can already cash out to get a free iPhone skin, costing 35 points. You gain 2 points for joining, and you get to play a game where u collect the falling points and that should [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/fF9dOzsOXwcgW3ZQiHy2iGIjogA/0/da"><img src="http://feedads.g.doubleclick.net/~a/fF9dOzsOXwcgW3ZQiHy2iGIjogA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/fF9dOzsOXwcgW3ZQiHy2iGIjogA/1/da"><img src="http://feedads.g.doubleclick.net/~a/fF9dOzsOXwcgW3ZQiHy2iGIjogA/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fbncapps.com%2Flockerz-com-free-stuff%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fbncapps.com%2Flockerz-com-free-stuff%2F" height="61" width="51" /></a></div><p><a href="http://lockerz.com" rel="nofollow">Lockerz.com</a> is a site where you can get free stuff, such as iPods, PS3's, cases, etc. After a day I can already cash out to get a free iPhone skin, costing 35 points. You gain 2 points for joining, and you get to play a game where u collect the falling points and that should gain you about 25. You can earn 2 a day easily by answering a simple question (such as "Where do you see yourself in 5 years?")</p>
<p>The site is invite only as it is in Beta, but if you would like to be invited, I am able to provide that.</p>
<p>Simply <a href="http://bncapps.com/?page_id=176">Contact Me</a> and provide your email. I will send out the invite ASAP.</p>
<img src="http://feeds.feedburner.com/~r/Bncapps/~4/8wp2HKvx4Sw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bncapps.com/lockerz-com-free-stuff/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://bncapps.com/lockerz-com-free-stuff/</feedburner:origLink></item>
		<item>
		<title>In class bordom</title>
		<link>http://feedproxy.google.com/~r/Bncapps/~3/CInoCj_FOdg/</link>
		<comments>http://bncapps.com/in-class-bordom/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 14:55:55 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[java input]]></category>
		<category><![CDATA[java vowel count]]></category>

		<guid isPermaLink="false">http://bncapps.com/?p=498</guid>
		<description><![CDATA[So today in my Java class, when everyone was learning how to do their Hello world "programs" I just coded some random thing that takes input until a certain string is entered, and counts the vowels.
I will probably be posting a whole bunch of random codes up as the weeks go on and I am [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/_RMDwFEx26TfBpntKUYbT8GzjK4/0/da"><img src="http://feedads.g.doubleclick.net/~a/_RMDwFEx26TfBpntKUYbT8GzjK4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/_RMDwFEx26TfBpntKUYbT8GzjK4/1/da"><img src="http://feedads.g.doubleclick.net/~a/_RMDwFEx26TfBpntKUYbT8GzjK4/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fbncapps.com%2Fin-class-bordom%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fbncapps.com%2Fin-class-bordom%2F" height="61" width="51" /></a></div><p>So today in my Java class, when everyone was learning how to do their Hello world "programs" I just coded some random thing that takes input until a certain string is entered, and counts the vowels.</p>
<p>I will probably be posting a whole bunch of random codes up as the weeks go on and I am sitting in class.</p>
<pre class="java">&nbsp;
<span style="color: #a1a100;">import java.util.*;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Sept16<span style="color: #66cc66;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">void</span> main<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> args<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
    Scanner input = <span style="color: #000000; font-weight: bold;">new</span> Scanner<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">in</span><span style="color: #66cc66;">&#41;</span>;
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> stringtest;
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> exitstring = <span style="color: #ff0000;">&quot;end&quot;</span>;
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> fullString = <span style="color: #ff0000;">&quot;&quot;</span>;
    <span style="color: #993333;">int</span> vowels,substart,subend;
    <span style="color: #b1b100;">do</span> <span style="color: #66cc66;">&#123;</span>
    stringtest = input.<span style="color: #006600;">next</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!stringtest.<span style="color: #006600;">equals</span><span style="color: #66cc66;">&#40;</span>exitstring<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
    fullString = fullString + stringtest;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span>!stringtest.<span style="color: #006600;">equals</span><span style="color: #66cc66;">&#40;</span>exitstring<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #993333;">int</span> strlength = fullString.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span>strlength<span style="color: #66cc66;">&#41;</span>;
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span>fullString<span style="color: #66cc66;">&#41;</span>;
&nbsp;
    substart = <span style="color: #cc66cc;">0</span>;
    subend = <span style="color: #cc66cc;">1</span>;
    vowels = <span style="color: #cc66cc;">0</span>;
    <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> i = <span style="color: #cc66cc;">0</span>; i &lt;=<span style="color: #66cc66;">&#40;</span>strlength<span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>fullString.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>substart,subend<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">equals</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;a&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        vowels += <span style="color: #cc66cc;">1</span>;
      <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>fullString.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>substart,subend<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">equals</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;e&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        vowels += <span style="color: #cc66cc;">1</span>;
      <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>fullString.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>substart,subend<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">equals</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;i&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        vowels += <span style="color: #cc66cc;">1</span>;
      <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>fullString.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>substart,subend<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">equals</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;o&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        vowels += <span style="color: #cc66cc;">1</span>;
      <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>fullString.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>substart,subend<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">equals</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;u&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        vowels += <span style="color: #cc66cc;">1</span>;
      <span style="color: #66cc66;">&#125;</span>
      substart += <span style="color: #cc66cc;">1</span>;
      subend += <span style="color: #cc66cc;">1</span>;
    <span style="color: #66cc66;">&#125;</span>
    <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Vowels: &quot;</span> + vowels<span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<img src="http://feeds.feedburner.com/~r/Bncapps/~4/CInoCj_FOdg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bncapps.com/in-class-bordom/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://bncapps.com/in-class-bordom/</feedburner:origLink></item>
		<item>
		<title>Mass Tweet Lottery – Now with Twitter oAuth!</title>
		<link>http://feedproxy.google.com/~r/Bncapps/~3/ZNMKAImc6-0/</link>
		<comments>http://bncapps.com/mass-tweet-lottery-now-with-twitter-oauth/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 04:33:24 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bncapps.com/?p=495</guid>
		<description><![CDATA[Today I was learning how to use the Twitter oAuth API. If you dont know what this is, it is a way to allow third party sites access to your Twitter account to send Tweets and read your data, without giving your actual password! I worked to get this implemented in to the Mass Tweet [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/5nLcWJ4oo_sEN5KIWJ0fZ-PD8V4/0/da"><img src="http://feedads.g.doubleclick.net/~a/5nLcWJ4oo_sEN5KIWJ0fZ-PD8V4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/5nLcWJ4oo_sEN5KIWJ0fZ-PD8V4/1/da"><img src="http://feedads.g.doubleclick.net/~a/5nLcWJ4oo_sEN5KIWJ0fZ-PD8V4/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fbncapps.com%2Fmass-tweet-lottery-now-with-twitter-oauth%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fbncapps.com%2Fmass-tweet-lottery-now-with-twitter-oauth%2F" height="61" width="51" /></a></div><p>Today I was learning how to use the Twitter oAuth API. If you dont know what this is, it is a way to allow third party sites access to your Twitter account to send Tweets and read your data, without giving your actual password! I worked to get this implemented in to the Mass Tweet Lottery, now you can choose to login with your real user name and password, or using oAuth where you sign in through Twitter.</p>
<p>Now for those who were worried about joining it because it required storing your password, there is no need to worry.</p>
<p>Everyone can join, as long as you have atleast 100 followers! Join now:<br />
<a href="http://MassTweetLottery.com">http://MassTweetLottery.com</a></p>
<img src="http://feeds.feedburner.com/~r/Bncapps/~4/ZNMKAImc6-0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bncapps.com/mass-tweet-lottery-now-with-twitter-oauth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://bncapps.com/mass-tweet-lottery-now-with-twitter-oauth/</feedburner:origLink></item>
		<item>
		<title>Twitter Account Validation Script</title>
		<link>http://feedproxy.google.com/~r/Bncapps/~3/T3cJ2x1aMuU/</link>
		<comments>http://bncapps.com/twitter-account-validation-script/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 03:42:48 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[twitter account validation]]></category>

		<guid isPermaLink="false">http://bncapps.com/?p=491</guid>
		<description><![CDATA[I have many Twitter accounts I need to manage, and recently a few of them have been hacked, or the passwords got changed for a few hours, then changed back. Instead of finding out too late when this happens, I decided to write a script that checks them, and emails me notifying me if the [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/K0rpe-YMcjB1Krt51aAoKL16kXk/0/da"><img src="http://feedads.g.doubleclick.net/~a/K0rpe-YMcjB1Krt51aAoKL16kXk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/K0rpe-YMcjB1Krt51aAoKL16kXk/1/da"><img src="http://feedads.g.doubleclick.net/~a/K0rpe-YMcjB1Krt51aAoKL16kXk/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fbncapps.com%2Ftwitter-account-validation-script%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fbncapps.com%2Ftwitter-account-validation-script%2F" height="61" width="51" /></a></div><p>I have many Twitter accounts I need to manage, and recently a few of them have been hacked, or the passwords got changed for a few hours, then changed back. Instead of finding out too late when this happens, I decided to write a script that checks them, and emails me notifying me if the passwords are invalid. </p>
<p>I use my function from this post: <a href="http://bncapps.com/php-verifying-twitter-credentials-using-fsock/">Verifying Twitter Credentials using fsock</a></p>
<p>See the full article for more!<br />
<span id="more-491"></span><br />
<center></center></p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #0000ff;">$emailaddress</span> = <span style="color: #ff0000;">'youremail@domain.com'</span>;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> verifyCredentials<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$username</span>, <span style="color: #0000ff;">$password</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
&nbsp;
<span style="color: #0000ff;">$out</span>=<span style="color: #ff0000;">&quot;GET http://twitter.com/account/verify_credentials.xml HTTP/1.1<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
  .<span style="color: #ff0000;">&quot;Host: twitter.com<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
  .<span style="color: #ff0000;">&quot;Authorization: Basic &quot;</span>.<a href="http://www.php.net/base64_encode"><span style="color: #000066;">base64_encode</span></a> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$username</span>.<span style="color: #ff0000;">&quot;:&quot;</span>.<span style="color: #0000ff;">$password</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
  .<span style="color: #ff0000;">&quot;Content-type: application/x-www-form-urlencoded<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
  .<span style="color: #ff0000;">&quot;Connection: Close<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
&nbsp;
<span style="color: #0000ff;">$fp</span> = <a href="http://www.php.net/fsockopen"><span style="color: #000066;">fsockopen</span></a> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'twitter.com'</span>, <span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.php.net/fwrite"><span style="color: #000066;">fwrite</span></a> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$fp</span>, <span style="color: #0000ff;">$out</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0000ff;">$buf</span> = <a href="http://www.php.net/fread"><span style="color: #000066;">fread</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$fp</span>, <span style="color: #cc66cc;">1024</span><span style="color: #66cc66;">&#41;</span>;
<a href="http://www.php.net/fclose"><span style="color: #000066;">fclose</span></a> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$fp</span><span style="color: #66cc66;">&#41;</span>;
 <span style="color: #0000ff;">$pos</span> = <a href="http://www.php.net/strpos"><span style="color: #000066;">strpos</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$buf</span>,<span style="color: #ff0000;">'Could not'</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$pos</span> === <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">1</span>;
<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">0</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">$u</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">'Twitteruser1'</span>;
<span style="color: #0000ff;">$p</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">'twitterpass1'</span>;
<span style="color: #0000ff;">$u</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">'Twitteruser2'</span>;
<span style="color: #0000ff;">$p</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">'twitterpass2'</span><span style="color: #ff0000;">';
$errors = 0;
$total = count($u);
for ($i = 0; $i&lt;$total; $i++){
$TwitterValid = new TwitterValid($u[$i],$p[$i]);
$validation = verifyCredentials($u[$i],$p[$i]);
if ($validation == 0){
$v[$i] = '</span>INVALID<span style="color: #ff0000;">';
$errors = 1;
}else{
$v[$i] = '</span>VALID<span style="color: #ff0000;">';
}
}
if ($errors == 1){
for ($i = 0; $i&lt;$total; $i++){
	$summary = $summary. &quot;$u[$i] - $v[$i]<span style="color: #000099; font-weight: bold;">\n</span>&quot;;
}
$headers .= &quot;MIME-Version: 1.0<span style="color: #000099; font-weight: bold;">\n</span>&quot;;
$headers = '</span>From: Validation@<span style="color: #ff0000;">'.preg_replace('</span><span style="color: #808080; font-style: italic;">#^www\.#', '', strtolower($_SERVER['SERVER_NAME']))  . &quot;\n&quot;;</span>
<span style="color: #0000ff;">$headers</span> .= <span style="color: #ff0000;">&quot;Content-Type: text/plain<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
<span style="color: #0000ff;">$mail_Subject</span> = <span style="color: #ff0000;">&quot;Twitter Accounts - Invalid!&quot;</span>;
<span style="color: #0000ff;">$mail_Body</span> = <span style="color: #ff0000;">&quot;At least one account showed up with an invalid password!
Summary:
$summary
&quot;</span>;
<a href="http://www.php.net/mail"><span style="color: #000066;">mail</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$emailaddress</span>, <span style="color: #0000ff;">$mail_Subject</span>, <span style="color: #0000ff;">$mail_Body</span>,<span style="color: #0000ff;">$headers</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>So basically, you would add an aditional<br />
$u[0] = 'Twitteruser1';<br />
$p[0] = 'twitterpass1';<br />
For each account, obviously incrementing the array size.</p>
<p>I use cronjobs each hour to run this script and it emails me only if any of the accounts appear invalid.</p>
<img src="http://feeds.feedburner.com/~r/Bncapps/~4/T3cJ2x1aMuU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://bncapps.com/twitter-account-validation-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://bncapps.com/twitter-account-validation-script/</feedburner:origLink></item>
	</channel>
</rss>
