Saturngod

What's on my mind

Get Total follower with Twitter API

It's very easy. see the code. I recommend to use with XML for twitter api. XML feedback is more faster than json.
<?php

$toopen="http://twitter.com/users/show.xml?screen_name=saturngod ";

$ch = curl_init(); /// initialize a cURL session
curl_setopt($ch, CURLOPT_URL, $toopen );
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$content = curl_exec ($ch);//end get cool feedburner count
curl_close($ch);

$dom = new DOMDocument();
$dom->preserveWhiteSpace = false;
$dom->loadXML($content);
$count=$dom->getElementsByTagName("followers_count")->item(0)->nodeValue;
$twitt=$dom->getElementsByTagName("text")->item(0)->nodeValue;

?>

Get subscriber count with feedburner API

Today, I want to add feed count from feedburner , in my blog. So, I need to write code using feedburner api. It's not easy.
  1. login your feedburner and go to your feed.
  2. Go to Publicize tag
  3. Go to Awareness Api and active it. Now, time for coding. change your id in uri of $toopen. In the code, I use saturngoden.

$ch = curl_init(); /// initialize a cURL session curl_setopt($ch, CURLOPT_URL, $toopen ); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); $content = curl_exec ($ch);//end get cool feedburner count curl_close($ch);

$dom = new DOMDocument(); $dom->preserveWhiteSpace = false; $dom->loadXML($content); $count=$dom->getElementsByTagName("entry")->item(0)->getAttribute("circulation"); echo $count; ?>

Amazing IE7 Cache

Today, I have a trouble in IE7\. Client use IE7\. I use ajax for searching and reporting. Search the username and then show the page. Fil the form , save it. And then search this username again and can't fill the form again. It's simple and work smoothly in Firefox,chrome,safari. What the hell in IE !!! IE 8 and IE 7 can't. I can fill again the form. WTF!! I clear the cache in IE and then search again. It's OK.

And then search user and fill again. After that search this user again, same problem in IE. In IE 8, I change to Never Temporarily files from Setting Page. Yay.. it’s working. In IE7, cannot. So, I use PHP header with no-cache. Cannot. So, add meta for without cache. Cannot. So, change temporarily files space to 8 MB in IE. cannot. no way. WTF!! IE7. I cannot do anymore. I give up it.

Magento Admin panel in Localhost

You cannot login admin panel in Magento after install magento in your  localhost.

Go to the

app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

and then open it.

Find

// session cookie params $cookieParams = array( ‘lifetime’ => $cookie->getLifetime(), ‘path’     => $cookie->getPath() ‘domain’   => $cookie->getConfigDomain(), ‘secure’   => $cookie->isSecure(), ‘httponly’ => $cookie->getHttponly() );

if (!$cookieParams[‘httponly’]) { unset($cookieParams[‘httponly’]); if (!$cookieParams[‘secure’]) { unset($cookieParams[‘secure’]); if (!$cookieParams[‘domain’]) { unset($cookieParams[‘domain’]); } } } and chang to following // session cookie params $cookieParams = array( ‘lifetime’ => $cookie->getLifetime(), ‘path’     => $cookie->getPath() //‘domain’   => $cookie->getConfigDomain(), // ‘secure’   => $cookie->isSecure(), //‘httponly’ => $cookie->getHttponly() );

/ if (!$cookieParams[‘httponly’]) { unset($cookieParams[‘httponly’]); if (!$cookieParams[‘secure’]) { unset($cookieParams[‘secure’]); if (!$cookieParams[‘domain’]) { unset($cookieParams[‘domain’]); } } } / Now, you can login admin panel in localhost.

Update Facebook Like WP Plugin

Now Support Layout in Plugins. You can your facebook like button layout.

http://downloads.wordpress.org/plugin/facebook-like.zip

Why am I writing MZ 2.0 ?

In this days, many question &amp; anaswers system are popular. So,  why I write this ? Answer it simple, I want to do myself.

I don’t

Testing Opera 10.52

Today, I tested opera browser. When I test version 10 release, I don't like it. In version 10, not support Myanmar Unicode Character and can't render it. Now, arrived 10.52 can see Myanmar character but some character still not show. It's really awesome fast in my Mac OS 10.6.3\. In opera, rounded corner CSS is support. It's nice but still not support some CSS 3 feature, gradient , transform , etc. For me, this feature are no need. I want only rounded corner. It's working and great! I can use 

border-radius:5px;

for round corner.

Facebook like on WP Plugin

Yay... today... I got approve from wordpress. Now, you can install from wordpress plugins website.

http://wordpress.org/extend/plugins/facebook-like/

Facebook Like js Confilt with facebook share

Today, I wrote a plugin, facebook like with XFBML. Facebook like share is not showing. I didn't know, why ? I check my code and check my blog. Disable some script and testing. I found it. When I use Facebook share, facebook like can't work and it's conflit javascript vairable. iFrame is no problem. Problem with XFBML. So, if we want to use two things, fblike and fbshare, we must use iframe for fblike. In my plugins, remove application ID and it will work with iframe. So, I decided to change again with iframe in all of my blog. I wanna facebook share and facebook like,too. Share from facebook like is not important for me.

Facebook Like WP-Plugin -- Update

Version 0.5

======== Support XFBML with Application ID *Confilt with Facebook Share and Fan Page Old Code if you use XFBML

facebooklike wordpress plugin