Monday, February 26, 2007

Need to show live clock on your blog/web page?

  • you want to show a live clock (digital/analog) on your website?
  • Don't know or have the code to do so?
  • Not able to develop a script to do the work for you?
  • You have script/code but it is not fancy enough to suit your website?

well i have a link to all of above questions (point me if i missed one).

The Internet is full of amazing tools and amazing people who are working hard to develop the cool tools for people like us you just enjoy it. Well this is enough i tell you the link.

Yesterday i was looking for good live clock script in javascript to show a digital clock on a web-application, i had one with me but it was not good enough and i didn't want to hack the script so i went to Lord of knowledge base 'Google' and ask him to give me the solution and he put this link in my search bucket.

I am writing about a site named
ClockLink.com, they company who owns it has produced an amazing tool for Internet and free of cost. If you need to show an fancy and themed clock on your website or blog or any personal page, just go to ClockLink.com and select a clock from their gallery, click on it and copy code from new opened window to your page. Nothing else to do. Now go to page you just added their code and see the clock just right there where you pasted it in your page. More information can be taken from their website like how to paste there code on different blog sites to show up the clock.

They provide you flash or javascript code, choose whichever suits your need (some blog sites does not allow javascript codes, you can embed a flash object to show clock). They will also guide you according to your blog site.

It is really cool tool and A beautiful demo is on right top corner of this blog as you have noticed already on the home page of this blog. Here is another one below:


Back to myBlog with few Database Connections

Last two weeks were very hactic and tiring. I attended lots of work and meetings in these days and didn't get time to post on myBlog.

Well here i am again with some cool and new stuff i found on net in these days, ready to share with readers and implement in my programming.

I will try to be regular on posting from now on, i really missed it. Well all this later, now to the point.

Last week, while searching on net i again found a useful site named
Connectionstrings.com

What is this About?

(from the website)
The idea of ConnectionStrings.com is to provide an easy reference for connection strings.Today there is 178 connection strings in the database wich have been collected from other internet sites, books, help files, msdn etc or have been submitted by fellow developers from all around the world, Thank You!


(From Me)
As it says (not clearly) the website provides you the connection strings to connect to different database through programming languages like .NET and/or more.

Well it is not much useful for me now but may be in future, as it does not relate to PHP. But hey it is a useful site and should be mentioned here.

Go
here and check out yourself that if they provide connection string you are looking for.

Enjoy !

Wednesday, February 14, 2007

Fixing PNG transperency for Internet Explorer (MSIE): A Little Hack

Recently I have started using PNG format images for my web application icons because of its lossless data compression and variety of transparency options. More on PNG can be found on Wikipedia. (http://en.wikipedia.org/wiki/png)

Problem I faced with PNG images:
Well it is good to use PNG but there is one problem for PNG images with Internet Explorer (thanks to Microsoft and Bill Gates). Internet Explorer (IE) does not render PNG's transparency properly so background is shown for transparent PNG images. It was really bad hit for my development. But i believe 'where there is will, there is a way' or you can say 'where there is a problem, there is a solution'.

Solution I found and Implemented:
While searching for solution on Internet, I found a simple and useful solution to the problem. I implemented it and it worked great as the author said so. Well it is a little javascript hack for only Internet Explorer which renders PNG images as SPAN and displays the image as it is meant. The hack uses Microsoft's AlphaImageLoader filter to display the transparency of PNG images. The little javascript code only works with IE and does not bother other browsers.

Where to get it:
I have pasted the code at bottom of this post but i will recommend to go to official site for updated version of the code. The code is placed at the website
http://homepage.ntlworld.com/bobosola/. I didn't get the name of author, I feel sorry for I was not able to mention his/her name here. I didn't find it on site, if someone gets it please let me know. But the author has thanked many people on his website.

Disadvantages:
The hack is based on javascript and works only for Internet Explorer 5.5 and 6 on Windows. If javascript is OFF the images are shown as with background. (but i don't bother for that because my most web applications are based on Ajax so it is meant only for user with javascript ON). There are few more cons in hack which are explained on the site mentioned above.

The Code:
There are two ways of using the hack.


  1. Put following code to head section of your web page. (just copy/paste)

    <!--[if lt IE 7]>
    <script
    language="JavaScript">
    function correctPNG() // correctly handle PNG
    transparency in Win IE 5.5 & 6.
    {
    var arVersion =
    navigator.appVersion.split("MSIE")
    var version =
    parseFloat(arVersion[1])
    if ((version >= 5.5)
    && (document.body.filters))

    {
    for(var i=0;
    i<document.images.length;
    i++)

    {
    var img
    =
    document.images[i]

    var imgName =
    img.src.toUpperCase()

    if (imgName.substring(imgName.length-3, imgName.length) ==
    "PNG")

    {

    var imgID = (img.id) ? "id='" + img.id + "' " :
    ""

    var imgClass = (img.className) ? "class='" + img.className + "' " :
    ""

    var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt
    + "'
    "

    var imgStyle = "display:inline-block;" + img.style.cssText

    if (img.align == "left") imgStyle = "float:left;" +
    imgStyle

    if (img.align == "right") imgStyle = "float:right;" +
    imgStyle

    if (img.parentElement.href) imgStyle = "cursor:hand;" +
    imgStyle

    var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" +
    "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
    +
    "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" +
    img.src + "\', sizingMethod='scale');\"></span>"

    img.outerHTML =
    strNewHTML

    i = i-1

    }
    }
    }
    }
    window.attachEvent("onload",
    correctPNG);
    </script>
    <![endif]-->

  2. Second is save the above code in file and name it pngfix.js and copy the following code to head section of your web page.

    <!--[if lt IE 7]>

    <script defer type="text/javascript" src="pngfix.js"></script>

    <![endif]-->

Help for implementation:
If you need any help for implementing the code just visit the website of the author where he has explained it in a simple and effective way with demos. And secondly you can post comment here for help and I will help if I am able to.

Keep Sharing !

Thursday, February 8, 2007

Google's PageRank :: what is it?

While searching on net about Google's PageRank, I came across very detailed article on Google's PageRank. Not to forget the article is written by Phil Craven and this articles explains the depths of Google's PageRank. Don't be curious the link is here:
http://www.webworkshop.net/pagerank.html

Another interesting and informational site I found is
www.webrankinfo.com/english/, it is enough informational to get around SEO stuff (Search Engine Optimization) and it has one module for Google only.

OK for further readers i have very interesting and useful information, specially for webmasters. If you need to see your web page's PageRank without installing Google Toolbar then you need to see following link:

  • MyGooglePageRank.com :- They give you javascript code to paste on your web pages which will display current page's Google PageRank. You can also check your web pages rank on their website. The service is totally free.
  • Firefox & Mozilla Extension :- This will install an extension to your browser to show current page's Google PageRank in status bar.
  • Webmastereyes.com :- It is another tool to check your Google PageRank online and you can also show a form on your site to let users check their page ranks by pasting some code from this site.
  • Prchecker.info :- This is also an cool tool to use. They simply provide little HTML code to paste into your page to show current page's Google PageRank.

There are more tools but i am not willing to search more as i am satisfy with the above available, but if you are interested to dig more just Google for 'Google PageRank' and see 30,900,000 results and pick suitable one for yourself.

I will prefer prchecker.info as this tool is simple to use and can work even if scripts are disabled in user's browser because they provide HTML code which will be rendered by every known browser arround. The following is the DEMO and my blog's current Google PageRank

Page Rank Tool

p.s: well my blog's page rank is not good at this time. I hope for good ranking in future.

Hey!Watch :: Online Video Encoding Platform

This is an addition to my list of amazing tools on web and i was looking for this tool for long time and it came up to me in a sudden. To check out click here or keep reading further.

To use this tool you need to register first nothing else to do and you get a lot of features to convert your video files to any format you like. It has following features to enjoy:

  • Video encoding in any format you want
  • Well aware of today's growing number of multimedia devices
  • Grabbing Video Clips from Web Sites (even when there is no download link)
  • Smart notification - RSS and Ping
  • Customizable video encoding and file format conversion
  • Video encoding platform - API
  • Usability, interface and ease of use
  • Accessible from everywhere and from any device
They are providing two types of accounts, one is totally free but limited to some features (as limited monthly encode sessions etc.) and few less features then paid account but believe me after using this tool you will love to pay them for beautiful work they are doing for you. They ask for very little amount which will not pinch your pocket ($5/month & $40/year)

So stop reading here and check out the cool tool.

The Link: http://heywatch.com

Free MegaShare account

One of the most popular file hosting site Megashare is giving away limited number of premium accounts. That means no waiting for file download and always open sockets for fast downloading. The most admiring offer is the account you register will never expires. What else you need from them?

Just go to following UR L and grab one premium account for yourself before the box gets empty


The link is
http://www.megashare.com/free_prem.php

About PHP :: as i understand

PHP is a fast growing open source server side scripting language and written to be used for web programming.

PHP was originally written by Rasmus Lerdorf in 1994, mostly people does not exactly know what is the meaning of PHP or why this amazing language is named PHP. Rasmus Lerdorf initially created PHP to display his resume and to collect certain data, such as how much traffic his page was receiving. He called it 'Personal Home Page Tool', so now you know why it is named PHP (the present meaning of the PHP is 'Hypertext Preprocessor').

In 1997, two Israeli developers (Zeev Suraski and Andi Gutmans from Israel Institute of Technology) rewrote the parser and formed the base of PHP 3 (changing the language's name to the recursive initialism "PHP: Hypertext Preprocessor").

The official launch of PHP came in June 1998 after months of Beta Testing (and the fun begin). The latest version of PHP is 5.2.0 (till Feb 08, 2007, the day i wrote this post). The home of PHP is here http://www.php.net


The future of this language is very bright as so many contributors and a huge user base support are helping it to grow BIG .

Tuesday, February 6, 2007

Amazing Tools

Internet is full of amazing things, the most i am amazed of is the tools we can use for free. This is a start of my series of amazing tools i found on Internet and here is the first one.

LoginGear
As it's name explains everything this tools provides the user names & passwords of most common sites on Internet where you have to register against your will to get some useful knowledge. Firstly I thought it's illegal but when I read more about this amazing tool I found it is doing a great job. They just collect user names & passwords from users itself (from the users who like to share their login information with others) and just doing efforts to make it available to others. Following are few lines from their website:

  • It's important to keep in mind that all of the gears listed on LoginGear.com are created by users. If you can't find a working gear for a site then you are encouraged to register with that website and then add the gear to LoginGear.com for other users to use. Never enter your real login details into LoginGear.com because everyone else will be able to see the information you provide!

They call every 'Username & Password' a Gear, so they named it LoginGear. ( well that's cool! )

They have also provided a voting system for the Gears as if one is not working then you can vote for it to remove the non-functional Gear from the site.

So look at it yourself and have good use of it. The site address is www.logingear.com

enjoy !

Marketing My Blog

Publish the blog is easy but making it favourite to others is really a difficult task. I found some useful tips on blogger help site to market my blog on net.

I am working on the tips now. The first one is Technorati and here is my profile on it.

Technorati Profile

Making Your Web Applications More Secure

Another great article explaining about possible attacks on Web - based applications. I more considerable about this type of articles as i have developed so many web applications and still working on big projects. This articles reminded me of my mistake i have done in past. This articles is written by Nadav Samet on his blog. In this article he talks about most common possible attacks:

  • SQL Injection Attacks
  • XSRF: Cross-Site Request Forgery
  • XSS: Cross-Site Scripting

His explanations are simple and good enough to understand what he like to aware the world off. Here is the link:
http://tinyurl.com/2ub99b

p.s: the URL was long and creepy so i used amazing service tinyurl.com to convert it.

The window.onload problem

I found this very useful and explaining article while searching for a javascript problem i was facing during development of an online application (Ajax, PHP & MySQL based).

The article is written by Peter Michaux on his blog and explains the problem & solution related to window.onload event, the common problem faced by most of the web developers. Here is the link:
http://peter.michaux.ca/article/553

I am not able to brief it here because it's really big to be typed here.

enjoy

My Internet Search

Today i have decided to share my knowledge with anonymous readers of this blog. I mostly will share my development experiences and the links of useful information lying naked on Internet, i mean available to everyone. I hope this will help lots of people around the world.

enjoy with me


cheers !

Saturday, February 3, 2007

I am a teacher TODAY

Two days ago my second cousin joined my forces to learn about the amazing language PHP (i forget to mention before this i was a one man army). I left him with few books and links of websites to start with some reading about website and internet and about the languages or tools to be used to develop web applications and website back ends. And today from morning teaching him about PHP, telling him all the things to be known as on beginner level a person should know. He is quiet intelligent and learning very fast.

But the most amazing thing i feel today is that i am teaching someone for the first time in my life and enjoying it too. Just couple of years ago when i started learning PHP, that was time was very tough because no one was there to teach me and even internet was having less resources as compared the present time. But i feel amazing as reaching on this level.

I must say learning is great and i love to do this every day.

cheers