Posts by: Habib Ullah Bahar

World City locations database

For one of my projects, I need the geographical location (latitude, longitude, altitude) of all main cities of the world. It was a adobe air project to determine worldwide salat timetable automatically.

I couldn’t find a complete list. Then I found this site, Aneki World Cities. Then I designed a scrapper using PHP, and scrapped all the countries first, then their respective cities list, then respective geographical location. Then end result was a table in the database with all countries, respective cities and locations 🙂

How to enable Apache HTTP Authentication using PHP

The easiest way to password-protect a site is to use HTTP Authentication, where if a browser’s request for a protected page is not accompanied by the correct username and password, the Web server replies with an HTTP 401 error – which means “Unauthorized Access” – and an invitation for the browser to re-submit the request with a proper username and password. From the user’s point of view, most of this dialogue is hidden. Following that first failed request, the browser prompts the user (in a dialog box) for a username and password, and then re-submits the request, this time with the authentication information attached. Assuming the username/password combo is on the list of allowed users, the Web server then sends the page requested. The Web browser will likewise continue to send that username/password with all subsequent requests.

Look at the following code:

How to setup latex environment in Windows

Must read notice: Geekish Post….Only for geeks 😀

Do you need to write your first thesis paper or do you want your publication published in a famous journal?

So LaTeX is for you. LaTeX is a document preparation system for high-quality typesetting based on Donald E. Knuth’s TeX typesetting language or certain extensions. It is most often used for medium-to-large technical or scientific documents but it can be used for almost any form of publishing.

Well, definitely *NIX systems have built-in latex support, but in windows you need to set it up for yourself. As few monthes ago I have started writting my first thesis paper using latex and for some reason I have used windows system, I need to setup latex environment in windows. Definitely a annoying, time consuming task, So I have decided to share it 🙂

I am going to describe it step by step, please follow these steps as described, its important. I am assuming you have Windows XP or later versions and you have administrative privilege.

How to overcome download time limit

Some file storage sites give you a download link which use to expire after a definite time , like 1 hour or 24 hour. MiHD.net is one like them. They allow you to download files hosted on their server without any limitations, but the download link will be functional for 6 hours or other certain time. Not only these file hosting servers, often many sites from where you can download movie or songs, impose this kind of time limitation to balancing load.

But surely you can overcome this limitation.

8 easy steps to play with Google efficiently

When you don’t find anything or don’t know where to find, the only probable answer you may get “Google it!”. But finding your desired result is really a hard job unless you search for the keyword “Google”, “Microsoft”, “Facebook” or something like that!. But surely you are not going to search them. You may want to find where your favorite song or movie or e-book can be downloaded or a specific note about a specific person.

To make easier the job, you may wish to follow the following steps..

4 of 6
123456