<?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>takien, not taken &#187; Website</title> <atom:link href="http://takien.com/category/website/feed" rel="self" type="application/rss+xml" /><link>http://takien.com</link> <description>Webmaster&#039;s Information and Resource</description> <lastBuildDate>Fri, 03 Feb 2012 16:11:17 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Prevent Spammer to Register Using The Same Gmail Email (Duplicate User Accounts)</title><link>http://takien.com/1010/prevent-spammer-to-register-using-the-same-gmail-email-duplicate-user-accounts.php</link> <comments>http://takien.com/1010/prevent-spammer-to-register-using-the-same-gmail-email-duplicate-user-accounts.php#comments</comments> <pubDate>Sat, 21 Jan 2012 10:28:25 +0000</pubDate> <dc:creator>takien</dc:creator> <category><![CDATA[PHP]]></category><guid
isPermaLink="false">http://takien.com/?p=1010</guid> <description><![CDATA[Gmail,  Gmail is &#8230;, ah I really don&#8217;t need to explain this. So, continue reading The Facts Gmail ignores . (dot) in username If you have Gmail account example@gmail.com, actually you also have ex.ample@gmail.com, exam.ple@gmail.com, and so on until all characters in the username are separated with dot. These all have same inbox, and you can [...]]]></description> <content:encoded><![CDATA[<div
id="attachment_1026" class="wp-caption aligncenter" style="width: 270px"><a
href="http://img.takien.com/2012/01/gmail-new-look-logo.jpg"><img
class="size-full wp-image-1026" title="gmail-new-look-logo" src="http://img.takien.com/2012/01/gmail-new-look-logo.jpg" alt="Gmail logo new look" width="260" height="178" /></a><p
class="wp-caption-text">Gmail logo new look</p></div><p>Gmail,  Gmail is &#8230;, ah I really don&#8217;t need to explain this. So, continue reading <img
src='http://takien.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><h2>The Facts</h2><h3>Gmail ignores . (dot) in username</h3><p>If you have Gmail account <em>example@gmail.com</em>, actually you also have ex.ample@gmail.com, exam.ple@gmail.com, and so on until all characters in the username are separated with dot. These all have same inbox, and you can login using each of them. Also, emails come to that address will be received into one inbox example@gmail.com See: <a
href="http://www.dailytut.com/technology/gmail-dot-trick-bug-or-a-feature.html" target="_blank"><em>Gmail Dot Trick Bug or a Feature ?</em> </a></p><h3>Gmail ignores all character after + (plus sign) in username</h3><p>While you think the dot feature is not enough, Gmail also has another feature; you can add acceptable character in your username, separated by + (plus sign). It can be example+one@gmail.com, example+two@gmail.com, etc. An email sent to example@gmail.com or example+one@gmail.com or example+two@gmail.com will all be redirected to one common email address and that is example@gmail.com.<em> See: <a
href="http://labnol.blogspot.com/2006/09/gmail-easter-eggs-dot-blindess-email.html" target="_blank">GMail Easter Eggs: Dot Blindess &amp; Email Aliases</a></em>.<em><a
href="http://labnol.blogspot.com/2006/09/gmail-easter-eggs-dot-blindess-email.html" target="_blank"><br
/> </a></em></p><p>Gmail does not recognize characters after the PLUS symbol but the gmail search filter can distinguish between the different address and you can therefore redirect these email to separats gmail folders or apply different labels.</p><h3>Gmail user can use @googlemail.com instead of @gmail.com</h3><p>Again, example@gmail.com can be replaced with example@googlemail.com as well as if it combined with <em>dot</em> and <em>plus</em>.</p><h2>The Problem</h2><div
id="attachment_1027" class="wp-caption aligncenter" style="width: 288px"><a
href="http://img.takien.com/2012/01/spammer-in-smf-forum.png"><img
class="size-medium wp-image-1027" title="spammer-in-smf-forum" src="http://img.takien.com/2012/01/spammer-in-smf-forum-278x300.png" alt="Spammer in SMF forum" width="278" height="300" /></a><p
class="wp-caption-text">Spammer in SMF forum</p></div><p>Besides the advantage of filtering, this feature has disadvantage for website owner, eg Community Forum and or website that requires unique membership. Yes, persons with Gmail account could have as many as possible <strong>duplicate accounts</strong> in our website. Of course this is very undesirable. Moreover, this way mostly used by <strong>spammer</strong> to register in our forum as they only need one Gmail account to register their hundreds clone. Imagine this, how many accounts can be generated from one Gmail account? It almost infinite, if I can&#8217;t say unlimited.</p><h2>The Solution</h2><p>If you think Gmail feature is bad for membership website, the only solution is to strip all gmail aliases and leave only original <em>example@gmail.com</em> during member registration process. The following lines of code is a PHP functions for this task.</p><p><iframe
src="http://ngoding.com/54918.embed" frameborder="0" scrolling="no" width="100%" height="161"></p><pre>function strip_gmail_email_aliases($email){
if(preg_match('/gmail|googlemail/i',$email)){ /*detect if email string matches gmail or googlemail using preg_match() regex*/
$emailbody         = explode('@',strtolower($email)); /*separate email at @ sign using explode()*/
$mailusername     = preg_replace('/([\.]+)|((\+)+([\+\.\-_a-z0-9]+))/i','',$emailbody[0]); /*most important part, strip all dot and everything after 'plus' */
$email             = $mailusername.'@gmail.com'; /*rebuild email string, and use only gmail.com*/
}
return $email; /* return the new email string*/
}</pre><p></iframe></p><h2>Implementations</h2><h3>In WordPress</h3><div
id="attachment_1025" class="wp-caption aligncenter" style="width: 295px"><a
href="http://img.takien.com/2012/01/wordpress-logo.jpg"><img
class="size-full wp-image-1025" title="wordpress logo" src="http://img.takien.com/2012/01/wordpress-logo.jpg" alt="wordpress logo" width="285" height="177" /></a><p
class="wp-caption-text">wordpress logo</p></div><p>It&#8217;s easy to call this function in WordPress platform, using <strong>user_registration_email</strong> filter <a
href="http://takien.com/?s=hook" target="_blank">hook</a>. This function will be invoked immediately while user perform registration. Place this code in functions.php in your WordPress theme file or can be packaged into a <a
href="http://takien.com/?s=plugin" target="_blank">plugin</a>.</p><p><iframe
src="http://ngoding.com/2abc1.embed" frameborder="0" scrolling="no" width="100%" height="188"><pre>add_filter( 'user_registration_email', 'strip_gmail_email_aliases'); /* this filter will call strip_gmail_email_aliases functions*/
function strip_gmail_email_aliases($email){
if(preg_match('/gmail|googlemail/i',$email)){
$emailbody         = explode('@',strtolower($email));
$mailusername     = preg_replace('/([\.]+)|((\+)+([\+\.\-_a-z0-9]+))/i','',$emailbody[0]);
$email             = $mailusername.'@gmail.com';
}
return $email;
}</pre><p></iframe></p><h3>In SMF (Simple Machines Forum)</h3><div
id="attachment_1024" class="wp-caption aligncenter" style="width: 310px"><a
href="http://img.takien.com/2012/01/smf-forum.jpg"><img
class="size-medium wp-image-1024" title="smf-forum" src="http://img.takien.com/2012/01/smf-forum-300x158.jpg" alt="SMF Forum Logo" width="300" height="158" /></a><p
class="wp-caption-text">SMF Forum Logo</p></div><p>Unlike WordPress, SMF needs more attention while doing modifications. Yes, you need to hardly editing existing file, so don&#8217;t forget to backup before you do anything with files in SMF.</p><ol><li>The file you will edit located in<strong> /Sources/Register.php</strong></li><li>Open file with code editor, eg. Notepad++</li><li>Find this set of codes:<p><iframe
src="http://ngoding.com/281fc.embed" frameborder="0" scrolling="no" width="100%" height="300"></p><pre>	// Set the options needed for registration.
	$regOptions = array(
		'interface' =&gt; 'guest',
		'username' =&gt; !empty($_POST['user']) ? $_POST['user'] : '',
		'email' =&gt; !empty($_POST['email']) ? $_POST['email'] : '',
		'password' =&gt; !empty($_POST['passwrd1']) ? $_POST['passwrd1'] : '',
		'password_check' =&gt; !empty($_POST['passwrd2']) ? $_POST['passwrd2'] : '',
		'openid' =&gt; !empty($_POST['openid_identifier']) ? $_POST['openid_identifier'] : '',
		'auth_method' =&gt; !empty($_POST['authenticate']) ? $_POST['authenticate'] : '',
		'check_reserved_name' =&gt; true,
		'check_password_strength' =&gt; true,
		'check_email_ban' =&gt; true,
		'send_welcome_email' =&gt; !empty($modSettings['send_welcomeEmail']),
		'require' =&gt; !empty($modSettings['coppaAge']) &amp;&amp; !$verifiedOpenID &amp;&amp; empty($_SESSION['skip_coppa']) ? 'coppa' : (empty($modSettings['registration_method']) ? 'nothing' : ($modSettings['registration_method'] == 1 ? 'activation' : 'approval')),
		'extra_register_vars' =&gt; array(),
		'theme_vars' =&gt; array(),
	);</pre><p></iframe></li><li>DO NOT edit anything inside the code above, yet add this code after it:<p><iframe
src="http://ngoding.com/c28dd.embed" frameborder="0" scrolling="no" width="100%" height="147"></p><pre>/* strip all gmail aliases, comment here is useful when you want to do something in the future*/
if(preg_match('/gmail|googlemail/i',$regOptions['email'])){
	$emailbody 		= explode('@',strtolower($regOptions['email']));
	$mailusername 		= preg_replace('/([\.]+)|((\+)+([\+\.\-_a-z0-9]+))/i','',$emailbody[0]);
	$regOptions['email']= $mailusername.'@gmail.com';
}
/* end strip all gmail aliases*/</pre><p></iframe></p><p>As you see this is a direct code, not a PHP function, since it&#8217;s already in another SMF function, Register2()</li><li>Save file and re-upload it to server.</li></ol><h3>In Custom PHP</h3><p>If you using custom PHP code or CMS other than WordPress and SMF, call<em> strip_gmail_email_aliases()</em> right after registration form is submitted. Example:</p><p><iframe
src="http://ngoding.com/a41dc.embed" frameborder="0" scrolling="no" width="100%" height="258"></p><pre>/* define function*/
function strip_gmail_email_aliases($email){
if(preg_match('/gmail|googlemail/i',$email)){
$emailbody         = explode('@',strtolower($email));
$mailusername     = preg_replace('/([\.]+)|((\+)+([\+\.\-_a-z0-9]+))/i','',$emailbody[0]);
$email             = $mailusername.'@gmail.com';
}
return $email; /* return the new email string*/
}
if(isset($_POST['submit_register'])){ /* It's only an illustration and may differ with your actual code.*/
    $email = strip_gmail_email_aliases($_POST['email']);
    /* do the rest code here */
}
</pre><p></iframe></p><h2>Conclusion</h2><p><div
style="float:right;width:300px;height:250px;margin-left:20px"><script type="text/javascript"><!-- google_ad_client = "pub-3108107609212063"; /* takien-content-300x250, created 12/9/10 */ google_ad_slot = "4897738383"; google_ad_width = 300; google_ad_height = 250; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div>If you put the code correctly and work well, the registration will only record example@gmail.com (without dot, without + and other character after it, and not googlemail.com domain) and all other alias combination will be considered as duplicate (already registered). <img
src='http://takien.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p><p>Your comment are welcome. <img
src='http://takien.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://takien.com/1010/prevent-spammer-to-register-using-the-same-gmail-email-duplicate-user-accounts.php/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Styling Scrollbar to Look Like Facebook ScrollableArea Using jScrollPane</title><link>http://takien.com/980/styling-scrollbar-to-look-like-facebook-scrollablearea-using-jscrollpane.php</link> <comments>http://takien.com/980/styling-scrollbar-to-look-like-facebook-scrollablearea-using-jscrollpane.php#comments</comments> <pubDate>Fri, 30 Dec 2011 05:15:51 +0000</pubDate> <dc:creator>takien</dc:creator> <category><![CDATA[Web Design]]></category><guid
isPermaLink="false">http://takien.com/?p=980</guid> <description><![CDATA[What Is Scrollbar? According to Wikipedia, A scrollbar is an object in a graphical user interface (GUI) with which continuous text, pictures or anything else can be scrolled including time in video applications, i.e., viewed even if it does not fit into the space in a computer display, window, or viewport. It was also known [...]]]></description> <content:encoded><![CDATA[<h2>What Is Scrollbar?</h2><p><div
style="float:right;width:300px;height:250px;margin-left:20px"><script type="text/javascript"><!-- google_ad_client = "pub-3108107609212063"; /* takien-content-300x250, created 12/9/10 */ google_ad_slot = "4897738383"; google_ad_width = 300; google_ad_height = 250; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div>According to Wikipedia, A <strong>scrollbar</strong> is an object in a graphical user interface (GUI) with which continuous text, pictures or anything else can be scrolled including time in video applications, i.e., viewed even if it does not fit into the space in a computer display, window, or viewport. It was also known as a <strong>handle</strong> in the very first GUIs.</p><h2>What Is jScrollPane?</h2><p>jScrollPane is a cross-browser <a
href="http://jquery.com/" target="_blank">jQuery</a> plugin by <a
href="http://www.kelvinluck.com/" target="_blank">Kelvin Luck</a> which converts a browser&#8217;s default scrollbars (on elements with a relevant overflow property) into an HTML structure which can be easily skinned with CSS.</p><p>jScrollPane is designed to be flexible but very easy to use. After you have downloaded and included the relevant files in the head of your document all you need to to is call one javascript function to initialise the scrollpane. You can style the resultant scrollbars easily with CSS or choose from the existing themes. There are a number of different examples showcasing different features of jScrollPane and a number of ways for you to get support.</p><h2>What Is Facebook ScrollableArea?</h2><div
id="attachment_983" class="wp-caption aligncenter" style="width: 310px"><a
href="http://img.takien.com/2011/12/facebook-scrollable-area.png"><img
class="size-medium wp-image-983" title="facebook-scrollable-area" src="http://img.takien.com/2011/12/facebook-scrollable-area-300x261.png" alt="Facebook Scrollable Area" width="300" height="261" /></a><p
class="wp-caption-text">Facebook Scrollable Area</p></div><p>Recently, Facebook ScrollableArea can be found in many part of Facebook user interface to handle overflow content. One is in the activity feed in the top right area with a cute scrollbar that can be scrolled by dragging and mouse scroll.</p><p>Yes, it can be done nicely &#8212; with little CSS and JavaScript customization &#8212; using jScrollPane I mentioned above</p><h2>jScrollPane + (JavaScript + CSS) = Facebook ScrollableArea</h2><p>Don&#8217;t worry, there is no pain coding needed to do this, just follow this steps:</p><p><strong>1. Include jScrollPane library and jQuery (if not yet) to your page</strong></p><pre>&lt;!-- styles needed by jScrollPane --&gt;
&lt;link type="text/css" href="style/jquery.jscrollpane.css" rel="stylesheet" media="all" /&gt;

&lt;!-- latest jQuery direct from google's CDN --&gt;
&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;
&lt;/script&gt;

&lt;!-- the mousewheel plugin - optional to provide mousewheel support --&gt;
&lt;script type="text/javascript" src="script/jquery.mousewheel.js"&gt;&lt;/script&gt;

&lt;!-- the jScrollPane script --&gt;
&lt;script type="text/javascript" src="script/jquery.jscrollpane.min.js"&gt;&lt;/script&gt;</pre><p><strong>2.Initialize jScrollPane to your selector.</strong></p><p>By default, the following code is ready to convert your scrollbar to  jScrollPane.</p><pre>$(function() {
	$('.content-area').jScrollPane();
});</pre><p>But here, we need more settings. It&#8217;s should look like this:</p><pre>$('.content-area').jScrollPane({
	horizontalGutter:5,
	verticalGutter:5,
	'showArrows': false
});</pre><p><strong>3. Scrollbar should be hidden if no mouse over on it.</strong></p><p>So, we use .fadeIn() and .fadeOut() jQuery effects:</p><pre>$('.jspDrag').hide();
$('.jspScrollable').mouseenter(function(){
    $('.jspDrag').stop(true, true).fadeIn('slow');
});
$('.jspScrollable').mouseleave(function(){
    $('.jspDrag').stop(true, true).fadeOut('slow');
});</pre><p><strong>4. Last but not least, add custom CSS</strong><br
/> -</p><pre>/*scrollpane custom CSS*/
.jspVerticalBar {
	width: 8px;
	background: transparent;
	right:10px;
}

.jspHorizontalBar {
	bottom: 5px;
	width: 100%;
	height: 8px;
	background: transparent;
}
.jspTrack {
	background: transparent;
}

.jspDrag {
	background: url(images/transparent-black.png) repeat;
	-webkit-border-radius:4px;
	-moz-border-radius:4px;
	border-radius:4px;
}

.jspHorizontalBar .jspTrack,
.jspHorizontalBar .jspDrag {
	float: left;
	height: 100%;
}

.jspCorner {
	display:none
}</pre><p>We use a 1&#215;1 pixel PNG transparent image for jspDrag background, <a
href="http://img.takien.com/2011/12/transparent-black.png">Download it here</a> (right click, save link/target)</p><h2> Live Demo</h2><p><a
href="http://demo.takien.com/index.php?page=scrollable_area" target="_blank">Click Here to See Live Demo</a></p><p><em><br
/> </em></p> ]]></content:encoded> <wfw:commentRss>http://takien.com/980/styling-scrollbar-to-look-like-facebook-scrollablearea-using-jscrollpane.php/feed</wfw:commentRss> <slash:comments>16</slash:comments> </item> <item><title>Creating a WordPress-Alike Hook For Your Own CMS</title><link>http://takien.com/965/how-to-make-hook-on-your-own-cms-like-on-wordpress.php</link> <comments>http://takien.com/965/how-to-make-hook-on-your-own-cms-like-on-wordpress.php#comments</comments> <pubDate>Thu, 15 Dec 2011 15:48:05 +0000</pubDate> <dc:creator>takien</dc:creator> <category><![CDATA[PHP]]></category><guid
isPermaLink="false">http://takien.com/?p=965</guid> <description><![CDATA[Probably you have known this, WordPress code is pretty good, especially when compared with other CMS or what we ever found on PHP tutorials. The one I like is how WordPress uses hooks.   If you ever created WordPress plugins, you may experienced that you don&#8217;t need to modify any of core code just to add [...]]]></description> <content:encoded><![CDATA[<div
id="attachment_972" class="wp-caption alignleft" style="width: 310px"><a
href="http://img.takien.com/2011/12/hooks.jpg"><img
class="size-medium wp-image-972" title="hooks" src="http://img.takien.com/2011/12/hooks-300x300.jpg" alt="" width="300" height="300" /></a><p
class="wp-caption-text">Hooks ilustration, image courtesy of lookingglassoutfitters.com</p></div><p>Probably you have known this, WordPress code is pretty good, especially when compared with other CMS or what we ever found on PHP tutorials. The one I like is how WordPress uses <a
href="http://codex.wordpress.org/Plugin_API/Hooks" target="_blank">hooks.</a>   If you ever created WordPress <a
href="http://takien.com/category/cms/wordpress/wp-plugins" target="_blank">plugins</a>, you may experienced that you don&#8217;t need to modify any of core code just to add something in the header and footer. Or even for more complex task, add additional menu and page on WordPress admin.</p><p>Things you need to do is to know what hook related to that, and add actions or filter with your own callback function. WordPress hooks divided in to two sections; <em>Action hook</em> and <em>Filter hook</em>. What is the difference? In simple, actions is to add functionality or output, where filter is to manipulate existing output. WordPress hook code stored in <em>wp-includes/plugins.php</em></p><p>Err, I am not going to deeply explain about WordPress hook. But, in case you&#8217;re wondering how it works or may be you want implement it in your own CMS or PHP script, here is the step by step .</p><p><div
style="float:right;width:300px;height:250px;margin-left:20px"><script type="text/javascript"><!-- google_ad_client = "pub-3108107609212063"; /* takien-content-300x250, created 12/9/10 */ google_ad_slot = "4897738383"; google_ad_width = 300; google_ad_height = 250; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div>If WordPress uses global variable <strong>$wp_filter</strong> to store all of the filters, we use <strong>$cms_filter</strong> instead, or name it whatever you like .  This variable contains array of filters where we could modify later. To start, fill it with empty array.</p><pre>$cms_filter = Array();</pre><p>Declare <strong>do_action()</strong> function, the task of this function is to call custom functions stored in $cms_filter, uses  <a
href="http://php.net/manual/en/function.call-user-func-array.php" target="_blank"><em>call_user_func_array()</em></a>;</p><pre>function do_action($tag){
global $cms_filter;
if(isset($cms_filter[$tag]) AND function_exists($cms_filter[$tag])){
call_user_func_array($cms_filter[$tag], array());
}
}</pre><p>Declare <strong>add_action()</strong> function, the task of this function is to store custom function to $cms_filter global variable.</p><pre>function add_action($tag,$callback){
global $cms_filter;
$cms_filter[$tag] = $callback;
}</pre><p>And&#8230;&#8230;&#8230;. you&#8217;re done. What..? Yes, that code is already to use.</p><p>Ok, let&#8217;s go. Place this code in wherever you like, for example in your core CMS file, or in your header&#8217;s template file between &lt;head&gt; and &lt;/head&gt;</p><pre>do_action('cms_head');</pre><p>Whenever you want to add something to the location, just call this function:</p><pre>add_action('cms_head','script_in_my_head');</pre><p><em>cms_head</em> is hook name, and<em> script_in_my_head</em> is must exists callback function that refer to your custom code. See example below:</p><pre>function script_in_my_head(){
echo '&lt;script&gt;alert('Hello world!')&lt;/script&gt;';
}</pre><p><strong>Note</strong>: This is only a simple working code, not a replacement nor has same capability as actual WordPress hooks. You may edit or improve it to meet your need.</p> ]]></content:encoded> <wfw:commentRss>http://takien.com/965/how-to-make-hook-on-your-own-cms-like-on-wordpress.php/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Searching File Within Directory Recursively Using PHP</title><link>http://takien.com/956/searching-file-within-directory-recursively-using-php-scandir.php</link> <comments>http://takien.com/956/searching-file-within-directory-recursively-using-php-scandir.php#comments</comments> <pubDate>Wed, 26 Oct 2011 19:45:04 +0000</pubDate> <dc:creator>takien</dc:creator> <category><![CDATA[PHP]]></category><guid
isPermaLink="false">http://takien.com/?p=956</guid> <description><![CDATA[Recently I had to find my file stored somewhere in my server. Although I can do this easily using the built-in feature in cPanel File Manager, but what I need is to search file programaticallyusing a script. So, I created this function. The function accepts three parameters: $dir (string), absolute path of the directory to [...]]]></description> <content:encoded><![CDATA[<p>Recently I had to find my file stored somewhere in my server. Although I can do this easily using the built-in feature in cPanel File Manager, but what I need is to search file programaticallyusing a script. So, I created this function.</p><pre>function find_file($dirs,$filename,$exact=false){

	$dir = @scandir($dirs);
	if(is_array($dir) AND !empty($dir)){
	foreach($dir as $file){
	if(($file !== '.') AND ($file!=='..')){
	if (is_file($dirs.'/'.$file)){
		$filepath =  realpath($dirs.'/'.$file);

		if(!$exact){
			$pos = strpos($file,$filename);
			if($pos === false) {
			}
			else {
				if(file_exists($filepath) AND is_file($filepath)){
				echo str_replace($filename,'&lt;span style="color:red;font-weight:bold"&gt;'.$filename.'&lt;/span&gt;',$filepath).' ('.round(filesize($filepath)/1024).'kb)&lt;br /&gt;';
				}
			}
		}
		elseif(($file == $filename)){

			if(file_exists($filepath) AND is_file($filepath)){
				echo str_replace($filename,'&lt;span style="color:red;font-weight:bold"&gt;'.$filename.'&lt;/span&gt;',$filepath).' ('.round(filesize($filepath)/1024).'kb)&lt;br /&gt;';
			}
		}
	}
	else{
		find_file($dirs.'/'.$file,$filename,$exact);
	}
	}
	}
	}
}</pre><p>The function accepts three parameters:</p><p><div
style="float:right;width:300px;height:250px;margin-left:20px"><script type="text/javascript"><!-- google_ad_client = "pub-3108107609212063"; /* takien-content-300x250, created 12/9/10 */ google_ad_slot = "4897738383"; google_ad_width = 300; google_ad_height = 250; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div></p><ol><li>$dir (string), absolute path of the directory to start the search, to use current directory use dirname(__FILE__).</li><li>$filename (string), the keyword to search for.</li><li>$exact (bool), true/false, default is false. If you set it to true it will find the exact &#8216;index.php&#8217; not &#8216;anotherindex.php&#8217; for keyword &#8216;index.php&#8217;.</li></ol><h2>How to use this function?</h2><p>This will find all file name contains <strong>content</strong> within current directory and all it&#8217;s sub directories.</p><pre>&lt; ?php find_file(dirname(__FILE__),'content');
?&gt;</pre><p>And the search result will be like this:</p><div
id="attachment_959" class="wp-caption aligncenter" style="width: 310px"><a
href="http://img.takien.com/2011/10/search-file-using-php.png"><img
class="size-medium wp-image-959" title="search-file-using-php" src="http://img.takien.com/2011/10/search-file-using-php-300x186.png" alt="Search file using PHP functions" width="300" height="186" /></a><p
class="wp-caption-text">Search file using PHP functions</p></div><h2>Another Approach</h2><p>Another way to search file in directory is using PHP <a
href="http://php.net/manual/en/function.glob.php" target="_blank"><strong>glob</strong> </a>function, as written <a
href="http://www.electrictoolbox.com/php-glob-find-files/" target="_blank">here</a>.</p> ]]></content:encoded> <wfw:commentRss>http://takien.com/956/searching-file-within-directory-recursively-using-php-scandir.php/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>72 New Top Level Domains will be available by October 2012</title><link>http://takien.com/877/72-new-top-level-domains-will-be-available-by-october-2012.php</link> <comments>http://takien.com/877/72-new-top-level-domains-will-be-available-by-october-2012.php#comments</comments> <pubDate>Wed, 08 Jun 2011 02:51:03 +0000</pubDate> <dc:creator>takien</dc:creator> <category><![CDATA[Domain]]></category> <category><![CDATA[News]]></category><guid
isPermaLink="false">http://takien.com/?p=877</guid> <description><![CDATA[In 2012 the next stage in the Internet&#8217;s revolution begins with the arrival of new top level domains (TLDs) such as .sfo, .berlin, .nyc, .web, .eco, .shop, .gay, .x-x-x, .hotel, .film, .radio, .green, .site, .sport and .music. ICANN, the organization in charge of domain names, is planning a dramatic rewriting of the rules for web [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://takien.com/wp-content/uploads/2011/06/new-tld-domain.jpg"><img
class="alignleft size-medium wp-image-881" title="new-tld-domain" src="http://takien.com/wp-content/uploads/2011/06/new-tld-domain-296x300.jpg" alt="" width="296" height="300" /></a>In 2012 the next stage in the  Internet&#8217;s revolution begins with the arrival of new top level domains  (TLDs) such as<strong> .sfo, .berlin, .nyc, .web, .eco, .shop, .gay, .x-x-x,  .hotel, .film, .radio, .green, .site, .sport and .music.</strong></p><p>ICANN, the organization in  charge of domain names, is planning a dramatic rewriting of the rules  for web addresses that could reduce the overwhelming importance of the  .com extension. Under new ICANN rules, groups and organizations will be  able to apply for new Internet extensions (the part after the “dot” in a  web address). The new domain extensions are officially called “new  generic top level domains” (new gTLDs).</p><p>Consider the opportunities that  new domains will offer organizations, businesses, and individual domain  owners, as well as end-users. Registering a .green domain for your brand  sends the unmistakable signal that your company is dedicated to  preserving the environment. New eCommerce organizations are assured of  data security with a .secure domain for their checkout processes. And  new musicians can launch their careers with .music domains. We estimate that the first group of new gTLDs (&#8220;first round&#8221;) will be <strong>available by October 2012.</strong></p><h2>Pre-register now!</h2><p>Secure your chance to own one of the upcoming new top-level domains by  pre-registering your desired domain name now. We will attempt to  register your reserved domains as soon as this becomes possible thereby  increasing your chances of owing one of the new TLDs. Additionally, by  pre-registering, you won&#8217;t miss any of the registration deadlines. The  pre-registration process is free; no processing fees will apply. Only in  the case that you do wish to register any reserved domains will you be  charged a fee. Unfortunately there is no guarantee that we can  successfully register all desired, pre-registered domains.<strong> </strong></p><div
id="attachment_878" class="wp-caption aligncenter" style="width: 829px"><a
href="http://takien.com/wp-content/uploads/2011/06/ntld_timeline.jpg"><img
class="size-full wp-image-878" title="ntld_timeline" src="http://takien.com/wp-content/uploads/2011/06/ntld_timeline.jpg" alt="New TLD Timeline //source: uniteddomains.com" width="819" height="182" /></a><p
class="wp-caption-text">New TLD Timeline //source: uniteddomains.com</p></div><h2>Lists of New Top Level Domains:</h2><p><div
style="float:right;width:300px;height:250px;margin-left:20px"><script type="text/javascript"><!-- google_ad_client = "pub-3108107609212063"; /* takien-content-300x250, created 12/9/10 */ google_ad_slot = "4897738383"; google_ad_width = 300; google_ad_height = 250; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div></p><ol><li>.africa</li><li>.bank</li><li>.bayern</li><li>.bcn</li><li>.berlin</li><li>.bike</li><li>.board</li><li>.bzh</li><li>.california</li><li>.cymru</li><li>.earth</li><li>.eco</li><li>.eng</li><li>.eus</li><li>.fam</li><li>.film</li><li>.florida</li><li>.free</li><li>.gal</li><li>.gay</li><li>.gmbh</li><li>.green</li><li>.hamburg</li><li>.health</li><li>.hiv</li><li>.horse</li><li>.hotel</li><li>.irish</li><li>.ker</li><li>.koeln</li><li>.kurd</li><li>.london</li><li>.love</li><li>.madrid</li><li>.moscow</li><li>.money</li><li>.miami</li><li>.mls</li><li>.movie</li><li>.music</li><li>.naples</li><li>.ngo</li><li>.nyc</li><li>.one</li><li>.pad</li><li>.paris</li><li>.peace</li><li>.phone</li><li>.quebec</li><li>.radio</li><li>.real</li><li>.riga</li><li>.roma</li><li>.saarland</li><li>.secure</li><li>.sfo</li><li>.shop</li><li>.sco</li><li>.scot</li><li>.sic</li><li>.site</li><li>.skate</li><li>.ski</li><li>.sport</li><li>.surf</li><li>.val</li><li>.vegas</li><li>.versicherung</li><li>.ven</li><li>.web</li><li>.wine</li><li>.x-x-x (without dash)</li></ol><p>Source: <em>Sedo, UnitedDomains.com</em></p> ]]></content:encoded> <wfw:commentRss>http://takien.com/877/72-new-top-level-domains-will-be-available-by-october-2012.php/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>[PHP] How To Parse Youtube URL to Get Video ID, Thumbnail Image, or Embed Code</title><link>http://takien.com/864/php-how-to-parse-youtube-url-to-get-video-id-thumbnail-image-or-embed-code.php</link> <comments>http://takien.com/864/php-how-to-parse-youtube-url-to-get-video-id-thumbnail-image-or-embed-code.php#comments</comments> <pubDate>Wed, 25 May 2011 03:14:36 +0000</pubDate> <dc:creator>takien</dc:creator> <category><![CDATA[PHP]]></category><guid
isPermaLink="false">http://takien.com/?p=864</guid> <description><![CDATA[Hello, sometime we need to parse Youtube URL to get video ID, thumbnail image, or embed code automatically with PHP. To do so, I have created a function parse_youtube_url(); With this function we can: - Get video ID - Get Embed code - Get Thumbnail or HQ Thumbnail URL Check this out: Note: Please report [...]]]></description> <content:encoded><![CDATA[<div
id="attachment_866" class="wp-caption alignleft" style="width: 160px"><a
href="http://takien.com/wp-content/uploads/2011/05/youtube-screenshot.jpg"><img
class="size-thumbnail wp-image-866" title="youtube-screenshot" src="http://takien.com/wp-content/uploads/2011/05/youtube-screenshot-150x150.jpg" alt="Youtube Screenshot" width="150" height="150" /></a><p
class="wp-caption-text">Youtube Screenshot</p></div><p>Hello, sometime we need to parse Youtube URL to get video ID, thumbnail image, or embed code automatically with PHP. To do so, I have created a function <strong>parse_youtube_url();</strong></p><p>With this function we can:</p><p>- Get video ID<br
/> - Get Embed code<br
/> - Get Thumbnail or HQ Thumbnail URL</p><p>Check this out:<br
/> <span
id="more-864"></span></p><pre>/*
* parse_youtube_url() PHP function
* Author: takien
* URL: http://takien.com
*
* @param string $url URL to be parsed, eg:
* http://youtu.be/zc0s358b3Ys,
* http://www.youtube.com/embed/zc0s358b3Ys
* http://www.youtube.com/watch?v=zc0s358b3Ys
* @param string $return what to return
* - embed, return embed code
* - thumb, return URL to thumbnail image
* - hqthumb, return URL to high quality thumbnail image.
* @param string $width width of embeded video, default 560
* @param string $height height of embeded video, default 349
* @param string $rel whether embeded video to show related video after play or not.

*/

function parse_youtube_url($url,$return='embed',$width='',$height='',$rel=0){
	$urls = parse_url($url);

	//url is http://youtu.be/xxxx
	if($urls['host'] == 'youtu.be'){
		$id = ltrim($urls['path'],'/');
	}
	//url is http://www.youtube.com/embed/xxxx
	else if(strpos($urls['path'],'embed') == 1){
		$id = end(explode('/',$urls['path']));
	}
	 //url is xxxx only
	else if(strpos($url,'/')===false){
		$id = $url;
	}
	//http://www.youtube.com/watch?feature=player_embedded&amp;v=m-t4pcO99gI
	//url is http://www.youtube.com/watch?v=xxxx
	else{
		parse_str($urls['query']);
		$id = $v;
		if(!empty($feature)){
			$id = end(explode('v=',$urls['query']));
		}
	}
	//return embed iframe
	if($return == 'embed'){
		return '&lt;iframe width="'.($width?$width:560).'" height="'.($height?$height:349).'" src="http://www.youtube.com/embed/'.$id.'?rel='.$rel.'" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;';
	}
	//return normal thumb
	else if($return == 'thumb'){
		return 'http://i1.ytimg.com/vi/'.$id.'/default.jpg';
	}
	//return hqthumb
	else if($return == 'hqthumb'){
		return 'http://i1.ytimg.com/vi/'.$id.'/hqdefault.jpg';
	}
	// else return id
	else{
		return $id;
	}
}</pre><pre>&lt;?php
echo parse_youtube_url('http://youtu.be/zc0s358b3Ys','hqthumb'); //return http://i1.ytimg.com/vi/zc0s358b3Ys/hqdefault.jpg
echo parse_youtube_url('http://www.youtube.com/watch?v=zc0s358b3Ys','embed'); //return embed code (iframe)
?&gt;</pre><p>Note:<br
/> Please report if there any error in the code you copied from here, because it might has changed by WordPress during saved/published.<br
/> Thank you.</p> ]]></content:encoded> <wfw:commentRss>http://takien.com/864/php-how-to-parse-youtube-url-to-get-video-id-thumbnail-image-or-embed-code.php/feed</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>List of Available &#8216;Unique&#8217; Domain Name for Your Website</title><link>http://takien.com/773/list-of-available-unique-domain-name-for-your-website.php</link> <comments>http://takien.com/773/list-of-available-unique-domain-name-for-your-website.php#comments</comments> <pubDate>Fri, 10 Dec 2010 02:07:02 +0000</pubDate> <dc:creator>takien</dc:creator> <category><![CDATA[Domain]]></category><guid
isPermaLink="false">http://takien.com/?p=773</guid> <description><![CDATA[May be you want to build a new website but don&#8217;t have idea about the domain name. Some of the requirements of domain name is short, pronounceable, easy to remember, and as much as possible has a dictionary meaning. And no less important is, has dot com extension. The following is the list of available [...]]]></description> <content:encoded><![CDATA[<p><div
id="attachment_774" class="wp-caption alignleft" style="width: 247px"><a
href="http://takien.com/wp-content/uploads/2010/12/domain-name.jpg"><img
src="http://takien.com/wp-content/uploads/2010/12/domain-name.jpg" alt="Domain Name" title="domain-name" width="237" height="200" class="size-full wp-image-774" /></a><p
class="wp-caption-text">Domain Name</p></div>May be you want to build a new website but don&#8217;t have idea about the domain name. Some of the requirements of domain name is short, pronounceable, easy to remember, and as much as possible has a dictionary meaning. And no less important is, has dot com extension.</p><p>The following is the list of available domain name you may want to register. Please use google or online dictionary to find out each word meaning.</p><p>Once you find the name you desired, you can register it through popular domain name registrar such as Godaddy, Name, Enom, Dynadot etc.</p><p>There is no guarantee about this domain availability since everyday people looking for a domain name. (I check this at Dec 06, 2010).</p><p><div
style="float:right;width:300px;height:250px;margin-left:20px"><script type="text/javascript"><!-- google_ad_client = "pub-3108107609212063"; /* takien-content-300x250, created 12/9/10 */ google_ad_slot = "4897738383"; google_ad_width = 300; google_ad_height = 250; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div></p><p>azoted.com<br
/> azoths.com<br
/> begazed.com<br
/> begazes.com<br
/> benzins.com<br
/> benzyls.com<br
/> blowzed.com<br
/> bortzes.com<br
/> braizes.com<br
/> bromize.com<br
/> brulzie.com<br
/> buzukia.com<br
/> buzukis.com<br
/> chazzen.com<br
/> clozes.com<br
/> coryzal.com<br
/> coryzas.com<br
/> cozener.com<br
/> crozers.com<br
/> defuzes.com<br
/> dezincs.com<br
/> diazole.com<br
/> ditzier.com<br
/> donzels.com<br
/> dozened.com<br
/> ectozoa.com<br
/> evzones.com<br
/> feazed.com<br
/> feazes.com<br
/> feazing.com<br
/> feezed.com<br
/> feezes.com<br
/> feezing.com<br
/> fozier.com<br
/> foziest.com<br
/> frazils.com<br
/> frizers.com<br
/> frizing.com<br
/> furzier.com<br
/> fuzils.com<br
/> gauzier.com<br
/> gauzily.com<br
/> gazars.com<br
/> gazumps.com<br
/> ghazies.com<br
/> glozes.com<br
/> glozing.com<br
/> grecize.com<br
/> hamzahs.com<br
/> hazans.com<br
/> heezed.com<br
/> heezes.com<br
/> heezing.com<br
/> hutzpas.com<br
/> huzzaed.com<br
/> jezails.com<br
/> khazens.com<br
/> kolhozy.com<br
/> kolkozy.com<br
/> mahzors.com<br
/> matzas.com<br
/> matzoon.com<br
/> mazards.com<br
/> mazedly.com</p> ]]></content:encoded> <wfw:commentRss>http://takien.com/773/list-of-available-unique-domain-name-for-your-website.php/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>How to Create Simple jQuery Tooltip</title><link>http://takien.com/740/how-to-create-simple-jquery-tooltip.php</link> <comments>http://takien.com/740/how-to-create-simple-jquery-tooltip.php#comments</comments> <pubDate>Tue, 30 Nov 2010 09:52:19 +0000</pubDate> <dc:creator>takien</dc:creator> <category><![CDATA[Web Design]]></category> <category><![CDATA[jQuery]]></category><guid
isPermaLink="false">http://takien.com/?p=740</guid> <description><![CDATA[There are so many jQuery Tooltip we can find on Google.  However, sometimes we just need something simple. So, why don&#8217;t you create your own? Basic This tooltip would replace title attribute of an HTML element. This tooltip text is extracted from the title attribute. This tooltip is compatible with common modern browser. This is [...]]]></description> <content:encoded><![CDATA[<p><div
id="attachment_754" class="wp-caption alignleft" style="width: 267px"><a
href="http://takien.com/wp-content/uploads/2010/11/tooltip.gif"><img
src="http://takien.com/wp-content/uploads/2010/11/tooltip.gif" alt="" title="tooltip" width="257" height="140" class="size-full wp-image-754" /></a><p
class="wp-caption-text">Tooltip on desktop application</p></div>There are so many jQuery Tooltip we can find on Google.  However, sometimes we just need something simple. So, why don&#8217;t you create your own?</p><p><strong>Basic</strong></p><ul><li>This tooltip would replace title attribute of an HTML element.</li><li>This tooltip text is extracted from the title attribute.</li><li>This tooltip is compatible with common modern browser.</li><li>This is not a jQuery plugin.</li></ul><p><strong>Logic</strong></p><p><div
style="float:right;width:300px;height:250px;margin-left:20px"><script type="text/javascript"><!-- google_ad_client = "pub-3108107609212063"; /* takien-content-300x250, created 12/9/10 */ google_ad_slot = "4897738383"; google_ad_width = 300; google_ad_height = 250; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div></p><p>When cursor over on an element with title attribute, normally it will display a tooltip. Extract that title attribute, save it to a variable and remove original title attribute (to prevent original title being displayed).<br
/> Create a div element next to current element with position absolute, hidden, and fill it up with extracted title text. Finally, display that div when mouse over on it.</p><p>Then what happen when mouse cursor leaves the element? Simply, restore title attribute, and hide or remove tooltip.</p><p><strong>Do it your self</strong></p><p>Below is the code with explanation comment.</p><p><strong>Mouse Enter</strong></p><pre class="brush: js">
$('.poptip').mouseenter(function(){
var text = $(this).attr('title'); //extract title, save to "text" variable
var posi = $(this).position();
var top  = posi.top; //top position
var left = posi.left+5; //left position
var wid	 = $(this).width(); //element width
$(this).attr('title',''); //remove original title
$(this).parent().append('
<div class="poptext">'+text.replace('|','')+'</div>

'); //create div element with class .poptext, and fill with extracted title.

//some css styling
	$('.poptext').css({'left':(left+wid)+'px',
				'top':(top-$('.poptext').height())+'px',
				'background':'#fffeee',
				'border':'1px solid #f7a229',
				'display':'none',
				'position':'absolute',
				'z-index':'1000',
				'padding':'5px',
				'font-size':'0.8em'
	});

//show tooltip, slowly
	$('.poptext').fadeIn('slow');
});
</pre><p><strong>Mouse Leave</strong></p><pre class="brush: js">
$('.poptip').mouseleave(function(){
	var title = $(this).parent().find('.poptext').html(); //restore title text from tooltip
	$(this).attr('title',title.replace('','|')); //place it back to title attribute
	$(this).parent().find('.poptext').fadeOut('slow'); //hide tooltip
	$(this).parent().find('.poptext').remove(); //remove element.
});
</pre><p><strong>Usage/Example</strong></p><pre class="brush: html">
<input type="text" name="name" value="" class="poptip" title="Type your username" />
</pre><p>You&#8217;re done.</p><div
class="information"><div
class="box-title">Demo</div><div
class="box-content"><br
/> See a live demo here <a
target="_blank" href="http://cektkp.com/test/jquerytooltip">http://cektkp.com/test/jquerytooltip</a><br
/></div></div><div
class="information"><div
class="box-title">Download</div><div
class="box-content"><br
/> Download full code here <a
target="_blank"  href="http://ngoding.com/74cac">http://ngoding.com/74cac</a><br
/></div></div> ]]></content:encoded> <wfw:commentRss>http://takien.com/740/how-to-create-simple-jquery-tooltip.php/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Honesty Is Not Always the Best Policy</title><link>http://takien.com/734/honesty-is-not-always-the-best-policy.php</link> <comments>http://takien.com/734/honesty-is-not-always-the-best-policy.php#comments</comments> <pubDate>Thu, 11 Nov 2010 19:45:13 +0000</pubDate> <dc:creator>takien</dc:creator> <category><![CDATA[Website Review]]></category> <category><![CDATA[bing]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[search engine]]></category> <category><![CDATA[yahoo]]></category><guid
isPermaLink="false">http://takien.com/?p=734</guid> <description><![CDATA[Suddenly I&#8217;m interested to talk about search engines. Many people talking about search engine comparison, the techniques of Search Engine Optimization, even just exposing new features. No, I do not want to talk about it. So? It&#8217;s about honesty. Yeah, their honesty in revealing the crime. Hahaha. Pictures mean a thousand words: Yahoo.com: Ask.com: Google.com: [...]]]></description> <content:encoded><![CDATA[<p>Suddenly I&#8217;m interested to talk about search engines. Many people talking about search engine comparison, the techniques of Search Engine Optimization, even just exposing new features. No, I do not want to talk about it. So? It&#8217;s about honesty. Yeah, their honesty in revealing the crime. Hahaha.</p><p><div
style="float:right;width:300px;height:250px;margin-left:20px"><script type="text/javascript"><!-- google_ad_client = "pub-3108107609212063"; /* takien-content-300x250, created 12/9/10 */ google_ad_slot = "4897738383"; google_ad_width = 300; google_ad_height = 250; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div></p><p>Pictures mean a thousand words:</p><p><strong>Yahoo.com:</strong><br
/> <img
src="http://takien.com/wp-content/uploads/2010/11/yahoo.gif" alt="Yahoo" /></p><p><strong>Ask.com:</strong><br
/> <img
src="http://takien.com/wp-content/uploads/2010/11/ask.gif" alt="Ask" /></p><p><strong>Google.com:</strong><br
/> <img
src="http://takien.com/wp-content/uploads/2010/11/google.gif" alt="Google" /></p><p><strong>Bing.com:</strong><br
/> <img
src="http://takien.com/wp-content/uploads/2010/11/bing.gif" alt="Bing" /></p><p>Note: Please try it at home. <img
src='http://takien.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://takien.com/734/honesty-is-not-always-the-best-policy.php/feed</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>jQuery PHP: Facebook Friend Selector Without FBML</title><link>http://takien.com/718/jquery-php-facebook-friend-selector-without-fbml.php</link> <comments>http://takien.com/718/jquery-php-facebook-friend-selector-without-fbml.php#comments</comments> <pubDate>Mon, 16 Aug 2010 15:49:11 +0000</pubDate> <dc:creator>takien</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[facebook]]></category> <category><![CDATA[html]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[json]]></category><guid
isPermaLink="false">http://takien.com/?p=718</guid> <description><![CDATA[Facebook friends selector is one of important thing when you develop a Facebook application. It will simplify the way your visitor select their Facebook friend&#8217;s instead of manually find friend&#8217;s user ID. Just type part of the friend&#8217;s name, the matches name will appears below the field and select one you want. This is not [...]]]></description> <content:encoded><![CDATA[<div
id="attachment_719" class="wp-caption alignleft" style="width: 160px"><a
href="http://takien.com/wp-content/uploads/2010/08/friend-selector.png"><img
class="size-medium wp-image-719 " title="friend-selector" src="http://takien.com/wp-content/uploads/2010/08/friend-selector-300x223.png" alt="Facebook Friend Selector, PHP + jQuery without FBML/iframe" width="150" /></a><p
class="wp-caption-text">Facebook Friend Selector</p></div><p>Facebook friends selector is one of important thing when you develop a Facebook application. It will simplify the way your visitor select their Facebook friend&#8217;s instead of manually find friend&#8217;s user ID.</p><p>Just type part of the friend&#8217;s name, the matches name will appears below the field and select one you want.</p><p>This is not just another Facebook friend selector you might found somewhere, because it&#8217;s not using FBML or iframe, there&#8217;s only JavaScript and PHP.<br
/><div
style="float:right;width:300px;height:250px;margin-left:20px"><script type="text/javascript"><!-- google_ad_client = "pub-3108107609212063"; /* takien-content-300x250, created 12/9/10 */ google_ad_slot = "4897738383"; google_ad_width = 300; google_ad_height = 250; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div><br
/> <strong>How it works?</strong></p><ol><li>Once you logged in, the script will ask your permission to access your account (friends list etc).</li><li>If you choose allow, then the script fetchs your friend data from https://graph.facebook.com/me/friends and get your friend lists in JSON format.</li><li>Some PHP function convert it into PHP array and simplify it, do some filtering based on user input, then encode back to JSON format so it will compatible with the jQuery autocomplete plugin.</li></ol><p><strong>Can&#8217;t wait to see it in action? </strong><br
/> Just follow the links below:</p><p><div
class="information"><div
class="box-title">Demo</div><div
class="box-content"><a
href="http://cektkp.com/test/friend/" target="_blank">Demo and Download</a><br
/></div></div><br
/> Credit: <a
target="_blank" href="http://www.codeassembly.com/Unobtrusive-jQuery-autocomplete-plugin-with-json-key-value-support/">jQuery Autocomplete Plugins</a></p> ]]></content:encoded> <wfw:commentRss>http://takien.com/718/jquery-php-facebook-friend-selector-without-fbml.php/feed</wfw:commentRss> <slash:comments>18</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 22/38 queries in 0.023 seconds using disk: basic

Served from: takien.com @ 2012-02-04 16:13:20 -->
