Hi Guys,
Today i had to write a small script that would map a Client IP to the Country. So that we can automatically fill the customer location in the registration forms etc … Although Google Maps API is really really cool , I couldnt find a possible way to retrieve the country, although the Geolocation was possible in dimensions but not as a Country. After running around with Google I came across http://ipinfodb.com/ip_location_api_json.php , The API is quite cool and the had a ready made jQuery script which I could just drop in to the application. The Database seems to be updated. I am happy if the accuracy is above 75% since the Internet is growing rapidly and since this is a Free Service.
Hi Guys,
I was working on a small bug which basically included a few Unicode languages issues. The problem began like this , I had to display a table of values where I had to retrieve a value from mysql. Theses values have Unicode characters like Français,Español etc … The funny part was once the data is queried from the DB and I use json_encode() from php to make it usable for javascript. Every single time the record contained a Unicode Value that field resulted as a Null. This was pretty annoying. After doing some research with Google and Stackoverflow. I found out that if I encode the unicode values before calling json encode the text will be passed to the client side , with all the funny symbols. And later I used unescape() function from javascript to convert the text to its normal Unicode state
Steps :
1) Server Side :
$rec['lang_name']=rawurlencode($rec['lang_name']);
2) Client Side :
this.lang_name=unescape(this.lang_name);
And this worked like a Charm.
Hi,
I was having a problem binding an event to an element loaded via AJAX. With the help of Google i was able to direct my self to this link in Stackoverflow According to that using the “live” function that comes with jQuery we can bind ajax loaded element to events easily.
Happy Coding ,
Gayan
Hi,
I guys , i was working on my mini ERP project for the Final Year of my bachelors and I had to use a Charting library which is flexible and easy to use with less overhead on the server. In order to do so out of many available libraries , I found jqBarGraphs quite promising. Although I have been coding in PHP for quite some time, my js knowledge is a bit scattered and not in a proper way. So i had a “NICE”
time trying to get the library to work with data passed from the Zend Controller Actions. Any how , after a “FEW” (I mean few 1..3) days I realized that the array of data parsed for the jqBarGraph input is returned as a String (Silly me right
). So now this baby is back to work like a charm. So I thought of leaving a not to all the developers with fine JS development skills like me lol
Download the library
The jqBarGraph is available for download here.
Since the documentation in the site is very clear i’m not going to go trough the Chart types and all.
In the Server side , I have a method that returns the data in the required format : <b> A Point to note here is the type casting in Line 8 it is required , other wise the JS will think that the value is a string
</b>
In the view/client side I wil call the draw the chart with the below bit of JS code :
I hope this helped , or at least save you guys a few hours
, hit me back if you think I should add more detailed version of the Scripts.
Happy coding ,
Gayan
Hi,
I was facing some difficulties trying to get jQuery $.ajax work with the zend framework. Although I have used it several times , I keep on forgetting what i should do
. This will give a small demo of the code snippets (So that I can refer back when I cant remember)
Hope this helps ..
HMVC also refered to as Hierarchical Module View Controller is a concept that is believed to be drawn from the fundamental concept of Presentation Abstraction Control (http://en.wikipedia.org/wiki/Presentation-abstraction-control). It allows you the ability to structure a Web app into independent modules with Low Coupling and High Cohesion ( I still remember these words from Ian Sommerville
). Anyhoo Codeigniter being one of my favorite frameworks provide a easy way to implement this HMVC pattern. Nettuts have provided a great tutorial that might help you with that. Which I believe is quite helpful. (http://net.tutsplus.com/tutorials/php/hvmc-an-introduction-and-application/) . So good luck , hope u make the best out of HMVC.
Mantis Bug Tracking is a great system which will eneable you to create , assign and administrate bugs on particular systems. If you look at its features one thing about it is IT’S FREE and the the balance feature list can be found here.
If you wish to to look at alternatives Bugzilla is another alternative that you will find.
So feel free to add your 2 cents about anyother bug tracking systm that you may think is suitable.
When it comes to external SEO nothing compares even remotely with the results you get by having high pr backlinks. Google does not care what content you send out to other sites in order to get your backlinks. All that google search engines are looking for to determine a site’s indexing is the quality and number of sites linking back.
It a proven fact that when you have high pr backlinks coming from high pr sites to your web site, your google ranking goes up almost immediately. In lesser competing keywords you could easily grab number one spots on Google by simply getting high pr backlinks which are optimally anchor tagged with your target keywords.
Getting these high pr backlinks can be elusive
but it’s not rocket science. If you have patience and are willing to take the time filling out forms there are thousands of high pr web sites you can eventually reach. Of course if you don’t have unlimited time on your hands but you have a marketing budget to work with then I highly recommend that you outsource your backlinking needs.
Outsourcing high pr backlinks can be expensive.
I saw one advertisement recently for the placement of 1 single backlink on a pr 6 web site permanently for $129. That may seem steep but a while ago I actually received $100 from someone who offered it to me to be linked from one of my pr 2 web sites for a year. I thought that was cool as I wasn’t even advertising that service.
There is a happy medium for your high pr backlink campaign if you want to save time but your budget is limited. I would suggest investing in either of the following 2 options. 1) Subscribe monthly to a reliable and affordable all in one solution with powerful script that automates many repetitive tasks involved with high backlinking technology. 2) Invest in software that allows you to effectively save yourself time getting those high pr backlinks out there.
Original Post: High PR Backlinks
I was running my blog at wordpress.com under a sub domain. Although i brought my self a domain name , i only used it to redirect to my blog and didn’t buy web hosting space at all. Recently i told my self , now it’s high time i get my self some web space. You know when you jump in to the sea to become a IT professional , you do need you own sweet space in the net.
Although I brought my domain from http://www.godaddy.com , there service and systems are a huge crap. Its true that they give unlimited bandwidth for all the packages they have , but they are not flexible and I don’t know why soon after purchasing the Web space , I canceled the product. Since I am located in Sri Lanka , I thought of going in for a local hosting provider. So I opened Chromium and searched for web hosts Sri Lanka. To see there is a bunch of resellers in Sri Lanka. Out of all I finally figured my Service provider , http://www.host.lk , their packages were quite reasonable , I mean 1 Gig space , 10 Gig bandwidth just for USD 9.00 per year. The packages are promising. And unlike other service providers in Sri Lanka host.lk provides payments via paypal which made my life easier.
I was quite happy with the service , I was called and informed once my account was up and running , they have a script installer which is damn easy and they will install anything that open source in one click. From a CMS ,Shopping Cart,Blogging platform to a Web development framework.
Anyways hope this will help you people to choose a better host. If you have had an amazing experience with a Hosting provider buzz me with a comment so that I could consider about the other available options as well.
Thats all for today … See you all with a informative post soon

Host.lk
Hi Guys,
This post is a small post which will show how to use the mencoder(m-encoder) to convert video files from mkv to avi. This is not a comprehensive tutorial although this conversion can be done between several formats. Just you would have to reed the manual a bit
To get started , i am using my Ubuntu 10.04 as a host box. First you need to have mencoder installed. You can do this by
#sudo apt-get install mencoder
or
Using synaptic
Once its done ,
#mencoder "Original_file_name.mkv" -ffourcc divx -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=400 -oac mp3lame -lameopts vbr=3 -o "New.avi"
After you run the above script , it will begin the convertion. You can add a ‘-v’ for verbose output if required.
I am hoping to write a wrapper for this using TCL or Python , if anyone has any ideas please post me up.
Hope this helps…
Happy converting !!!
Regards,
Gayan