Thursday, May 2, 2013

PHP Mysql to Mysqli mistakes

PHP Mysql to Mysqli mistakes

Converting from PHP Mysql statements to Mysqli statements I found myself making certain mistakes.

While the Mysqli procedural style resembles the mysql style, yet if you simply convert mysql_ to mysqli_ things won't work that easily ! I will try to list the errors and the actions I took for shifting to PHP procedural style mysqli statement.

Wednesday, March 6, 2013

Qnet networking Scam ?

Qnet networking Scam ?

Typing "Qnet is" in Google suggests "Scam" indicating what the people are searching for. This was the first thing I did after meeting a Qnet IR yesterday.

My cousin sister called me to "partner" with her in an e-commerce venture and to meet her senior regarding this. In evening I joined her in a coffee shop. Frankly it does not matter to me why in a coffee shop, as online ventures / software firms could easily cut down cost doing this. After waiting for half an hour the IR came and ordered a coffee for himself and things started to become more clear.

Tuesday, February 12, 2013

Screen Resolution in PHP

Screen Resolution in PHP

I was trying to get Screen resolution using PHP server side program, only to find out that it is not possible! Logically speaking too, PHP will be parsed on the server, prior showing it to the User. So the screen resolution will be on the client side e.g. the browser.

However using simple Javascript and cookie we can send the Screen size to the Server. The logic flow is
1. Get the screen resolution using Javascript
2. Store the screen size data into a cookie using Javascript

Wednesday, February 6, 2013

Google Adsense check not received ?

Google Adsense check not received ?

So you did not receive your Google Adsense Check! Before you panic and start cursing every advertiser, calm down. Relax ! Mostly it is not even Google's fault.

From my past experience I have found these general data :
Google issues Adsense check by around 25-30 each month
Shipment details of the check gets updated by around 4-10 (next month)
Adsense check gets returned from the local place by around 17-23 (next month)

Monday, February 4, 2013

Create a donation page for your Website

Create a donation page for your Website

While creating a donation page for your website, more users would donate if you keep them better informed. Any reader who appreciates your content or might want to contribute to your charitable actions, might show his love by a small amount of token through this donation page. Yet he might still want to know few details about his donation.

Minimum points to include in a donation page should be :

Saturday, January 26, 2013

Multiple like in sql Query performance

Multiple like in sql Query performance

Multiple like in sql query may slow down performance if not properly done !

Was using the below sql query in PHP
SELECT DISTINCT col.id,name,desc,city FROM col,course WHERE course.id=col.id AND course.id='$sql_id' AND name LIKE '%$like%' OR desc LIKE '%$like%' ORDER BY name LIMIT 0,100

Why I hate Facebook

Why I hate Facebook

You ask me Why I hate Facebook ? I can categorize my hatred for Facebook in two parts :

As a Normal User : I simply refer to self as Facebook User who is on Facebook for Social networking, to connect with friends and relatives and to know whats new with related people.

How to add College in Facebook ?

How to add College in Facebook ?

I was wondering how to add new College in Facebook. By adding college in Facebook I do not mean to select the Colleges from the list of Colleges generated by Facebook, but to add a new college not shown by Facebook in the list of Colleges.

This question made me think how actually Facebook know these colleges e.g. how does it suggest the colleges ? Did it employ someone who sits and finds new school and college to add it in Facebook ? I certainly do not think so ! The other way of doing it is simply asking its users to do it. This seems more acceptable to me.

nofollow links for footer ?

nofollow links for footer ?

Experts suggest footer links to be nofollow. nofollow suggests the Search Engine to not follow the individual link. In contrast the meta tag "nofollow" will guide the Search engine not to follow the entire page.

In our previous post, we talked about, how to nofollow any page or link . Google too suggests that if the footer links (Terms of service and Privacy policy etc) is linked from every page of the website then it is better to nofollow the link in the footer. The benefit of adding nofollow link is that the Page rank of any page is not shared with too many webpages. If you are wondering how will this affect your Page Rank or SEO, I highly recommend going through theory of Page Rank @
http://www.sirgroane.net/google-page-rank/

Redirect Users from your original atom feed to feedburner feed

You need to redirect the users from your original feed to the feedburner feed so that you can get accurate data of your subscribers. Consider this, if you do not redirect the users, then anyone can subscribe, not only through the feedburner feed but also your original feed.

Care should be taken while redirecting and not to redirect the feedburner from your original feed back to feedburner, called recursive feed error, creating an infinite loop of redirection. Feedburner suggests you 2 options for redirecting @
http://support.google.com/feedburner/bin/answer.py?hl=en&answer=78464&topic=13048&ctx=topic :

Highlight Code from the content

Highlight Code from the content

I saw highlighted code from the content in various blogs. Some highlighted Code even had line numbers and I did some Googling to come to know about Syntax Highlighter. I tried my hands over GeSHI - PHP syntax highlighter but the problem was
a) It was giving much more than I wanted (I want Simple things)
b) It required Codes to be told separately from the content.

Add Facebook Like Button in 3 steps

Add Facebook Like Button in 3 steps 

Today Facebook Like Button has become the de facto standard of Website Popularity. If any user likes your website by clicking the Facebook Like Button, the activity will be posted on his wall and hence informed to all his friends.
Hence Facebook like button may help to get more traffic to your website. Each like activity will increase the count of the people liking your website and also indicate your website popularity.
Let us see how you can add Facebook Like button to your Website in 3 simple steps.

Friday, January 25, 2013

Google Analytics for Ajax Pages

Google Analytics was missing the functionality to measure the Ajax Pages which are generated asynchronously using javascript.  This limitation was finally removed in 2011 when the Google Analytics Tracking Code themselves became asynchronous. Today you will not find the old code.

For monitoring the Ajax Pages you need to modify the Google Analytics Tracking Code.
For Example if you have a page say "original.php" which is generally loaded, viewed directly by any user and an Ajax Page say "ajax.php" which is loaded asynchronously in the "original.php" then the Google Analytics Code will be in "original.php" and "ajax.php" will not have any Tracking Code.

 Related posts or You May Also Like for Your Website

I first saw Related Posts or "You may also like" in a wordpress Blog. At the End of the blog post "You may also Like" suggested other related posts of similar or almost similar blog topics. So here is how you can implement "You may also Like" for your website.

What is a web host ?

What is a web host ?

Web host is an organization/company which provides web space in their server for you to put your files and start your website.

For understanding purpose, lets assume you want to share certain text, files, pictures etc which you have in a particular folder in your local hard-disk (read computer). Of course you can access it easily on your computer but if you want me to access it, you will need to put on internet either on some else website or your own.

Dynamic Website - What makes them dynamic ?

Dynamic Website - What makes them dynamic ?

Dynamic Website are website with Dynamic webpages. Such website contains dynamic content for the users.

When we say "Dynamic Content" we are referring to the webpage content which can be changed by its users as well as author. Some refer them for webpage generated dynamically e.g. using scripts or programs.