Although it’s not prevalent today as it was a few years back, some bloggers still display their Yahoo! Messenger status on their website. Here’s how you can customize you YM status icon by using the images of your choice!
You can view the demo (see bottom of page).
This tutorial was originally created and shared by Aditya Subawa from BloggerBelog, but before I go any further I’d just like to let you all know that this Blogger trick is not for everyone because to be able to make it work, you’re going to need a hosting site or a hosted server in which you’ll upload a PHP file. Aside from the hosting site, you’ll need to provide your own 2 sets of images for your icon: one for online status and the other to represent your offline status. Save these 2 images as “On.png” and “Off.png” (NOTE: they MUST BE in PNG(.png) format!).
Once you have both (hosting site and icons) ready, you may then continue with the tutorial’s steps:
- Copy/paste the PHP script below on a notepad
# create header image PNG
#Checks to yahoo with curl functions in php
$cURL = curl_init();
curl_setopt($cURL, CURLOPT_URL, "http://opi.yahoo.com/online?u=YOUR_YAHOO_ID&m=s");
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);
$strPage = curl_exec($cURL);
# If offline then the variable will be replaced with an image file offline
if ($strPage=="YOUR_YAHOO_ID is NOT ONLINE")
# If online then the variable will be replaced with an image file online
# Re-create the image
$buatgambar = imagecreatefrompng($gambar);
2. Replace all the YOUR_YAHOO_ID with that of your own (ex. if your YM ID or email is firstname.lastname@example.org then type in “this_is_me”)
3. Save the file as “ym.php”
4. Upload all 3 files (ym.php, on.png, Off.png) on to your server or hosting site
5. Log in to your Blogger dashboard
6. Go to the ‘Design’ section and then over to ‘Layout’ page
8. Copy/paste the following:
<!– Yahoo! custom image status by www.bloggerbelog.com –>
<a href="ymsgr:sendim?YOUR_YAHOO_ID"><img src="yourdomain-hosting.com/ym.php" title="Yahoo Custom image by www.bloggerbelog.com" border="0" /></a>
<!– Yahoo! custom image status by www.bloggerbelog.com.com –>
9. Replace all the necessary values (YOUR_YAHOO_ID and yourdomain-hosting.com/ym.php)
10. Save the widget
Congratulations, you’re done! View your result.
Related Tricks & Tutorials
Comments will be closed off on this post 365 days (1 year) after it is published. Apologies to this, but it's all about avoiding a growing comment spam problem. See our most recent posts where you can comment here