Thursday, October 09, 2008

Indian Trains tracked live on Google Maps



http://uselessdiaries.freehostia.com/train/train.pl?user=usd

Yeah, you heard it right. Here is the live tracking of trains in India using google maps API. Enter the start date of the train and the train number, and current postition of the train will be tracked. Once the site is loaded, the position of the train is refreshed every minute.

The site is still in BETA though. Only trains which are currently running will be displayed properly. There are still some bugs which need to be fixed.

If you are accessing using WAP/GPRS on your mobile, use this mobile friendly link

http://uselessdiaries.freehostia.com/train/mobile.php

WithoutGPS - Live tracking without GPS !!


There are quite a few websites which lets you track live if you have a GPS phone. I was curious if the "My location" feature in Google maps can be used to track the phone using only the mobile tower number information. WithoutGPS was born out of this curiosity.This was set up using code from various sources.


What is WithoutGPS?

You run an application on your smart phone, which updates your current tower information on the website which hosts the code, and you can get your position shown on google maps to anybody who has got an internet connection.




You can check my current location live at
http://uselessdiaries.freehostia.com/live.pl?loc=usd
If I am moving, the map will automatically move showing the updated position. (This site does not show properly in Chrome browser. Use IE or firefox)

How to setup WithoutGPS?

1. Right now only Nokia Symbian smartphones are supported(All S60 v2 and v3). Use the Aspicore GSM Tracker in your phone with the following settings:
HTTP protocol : On
Internet page URL : http://uselessdiaries.freehostia.com/gmaps.php?user=username&
(choose a unique username which nobody else could be using)
Send cell every time : On
Cell -> On startup tracking : On


2. This is your live tracking website : http://uselessdiaries.freehostia.com/live.pl?user=username

What else can I do with WithoutGPS?

1. If you want to host this in your own site, you can download all the server side code from http://uselessdiaries.freehostia.com/uploads/WithoutGPS.zip . Be sure to use your own Maps API key in the live.html file.

2. You can use this as a vehicle theft prevention system, by putting a sybian phone with GPRS connection always in your car. It can be setup at a hardware cost of around Rs 7500 (cost of a N72) and monthly charges of Rs 200/- (minmum voice plan + WAP over GPRS)


3. I have been running Aspicore GSM tracker on my N80 (s60v3) phone, and Airtel's mobile office plan, and it has been running without a hitch. Can anyone try out if this application works with Airtel Wap over PRS(which I think is called Airtel Online)


How exactly does WithoutGPS work?

1. The application on your phone sends the cell number of the mobile tower which you are connected to.
2. The gmaps.php script queries the google database with the cell tower information, and gets the longitude and latitude, which is recorded into a file.
3. When you click on the live.pl file, it uses the recorded information and shows it on google maps.



Future of WithoutGPS?

1. Efforts are on way so that you can specify zones - like home, office etc. And when you enter some specified zone, it will send an email (or an SMS) to some specified number.

2. Do you know of other applications which will allow http access over WAP/GPRS of the cell tower information in other phones do let me know.

3. I am not into mobile software writing, so if some one can write simple applications for uploading cell tower information, let me know, and I will post it here.

4. Your comments/suggestions/contributions/ideas/brickbats are always welcome.

Friday, May 09, 2008

GPS routes plotted on Google Maps

Following are some of the routes, which I have traced on my GPS (I use SmartComGPS software running on Nokia N80 with Haicom BT406C external bluetooth GPS). The idea is to give information of the route, the mode of transport and the amount of time required for the journey. I hope this will help travellers to these locations to plan their travel. Those who have GPS devices with them can also download the tracks to their devices.

The tracks are in OziExplorer (and SmartComGPS) format. You can right click on the download link and save with .plt extension. Use GPSBabel to convert it into any other GPS format.

More routes to follow soon......

Siliguri to Gangtok (download)
The trip starts from the New Jalpaiguri railway station. We took a shared taxi to the bus stand and took a Sikkim Nationalised Transport (SNT) bus from the Siliguri bus stand to Gangtok. Times are also shown.

Kollam to Alwaye (download)
Trip made by KPN Volvo. It was probably the 5:30 pm Volvo from Trivandrum to Bangalore. Route goes through NH 47 taking the Ernakulam bypass.

Kumaraparvata Trek (download)
Trek route from Kukke subramanya to the top of the Kumaraparvata. (The times shown on the bubbles are incorrect)

Shortcut Route from Electronic City to Sarjapur Road/Outer Ring Road , Bangalore
(download)
Takes an almost straight line path from Hosa Road junction to Sarjapur Road Junction.
Method of travel : Bus
Total time: 25 minutes in peak hour

Numbers enabled through Gizmo backdoor

Following is a list of numbers enabled via Gizmo backdoor dialling. You will be able to call them free using Gizmo.

214-235-4101 to 4993 (No information)
770-357-XXXX (Currently used by ringbranch)
773-751-1000 to 773-751-4999 (Currently used by Jaxtr)
617-861-9044
202-595-9402
457-345-6764
569-849-4893
569-856-4326
523-856-4326
599-856-4326
699-856-2398
299-856-2398
206-856-2398 (WA )
253-856-2398 (WA)
(469) 450-3729 (real TX phone number)
469-826-7076 (real TX number)

Feel free to let me know any other supported numbers.

Tuesday, April 29, 2008

Access numbers

USA 714-333-0397
UK 08449332754
UK 07031967238
UK 08444848677
UK 08700687353
UK 08715041691
Switzerland 61-5117717
Russia 3452-591002
Germany 1803-5350033033
France 1-79-99-79-99
China 21-31001856
Canada 613-686-1602
Brazil 11-3511-5700
Australia 3-8807-2174

Call free to India

Make a free call to India by following these steps:
1. Register for free at sab se bolo.com . Get your member ID and password. Provide these to your Indian contact and ask them to call into the conference.
2. Call any of these access numbers.
3. On the prompt dial *011-CONRAD. (This code will keep changing. So check this page before you make a call) This code is not required if you call through the UK numbers.
4. When prompted again, dial your member ID and password to enter into conference. You can have multiple people from India dial into the conference.

Do not abuse the system, or we might all lose it !!

Alternative methods for step 2:
METHOD 1.
Instead of calling the access numbers, you can even use your SIP phone/ATA to make a call to *0112663@sipbroker.com
METHOD 2. You can call from Google Talk by following these steps:
(a) Send a friend request to service@gtalk2voip.com. You will get an accept
(b) Now open a chat window for service@gtalk2voip.com and type "CALL *0112663@sipbroker.com"
(c) Accept the incoming call.
(d) You will hear one ring and after some time, you will be connected to the conference call.

Sunday, April 27, 2008

Converting your smartphone into a GPS navigation system

This entry essentially explains how to convert your bluetooth enabled smartphone into a GPS navigation system. This can also be used for those phones which have inbuilt GPS. If you do not have GPS, this will tell you how to store maps in your phone and view them.

Basic Requirements:
1. Smartphone - any one of the following
(a) Nokia symbian 60 series or above eg. 6630, all N-series and E-series of mobile phones
(b) Any mobile running Windows Mobile 5 or 6.


Getting the right hardware:

If you already have a bluetooth GPS or an inbuilt GPS in your phone, skip to the next section. If you need a GPS navigation system, the simplest and cheapest way I think would be to buy a smartphone and a bluetooth GPS and get it for half the price of a phone with inbuilt GPS. For instance, the cheapest option that I know of is Nokia N72 (INR 8000/-) + Navibe GB735 (INR 1800/-), while most of the GPS enabled phones currently in the market are above INR 20,000/- . There are Nokia smartpones cheaper than N72, but I they are much less worth for the 1000 rupee less that you pay.



Getting the right software:

(a) If you are using Nokia phone, get the SmartcomGPS software. You can get it from here mobilesmania forum. You will need to register for free at the site and dig a little bit to find the version for your phone. There is also a older but less featured MapViewGPS. Any of the above software will suffice.
(b)If you are running Windows Mobile phone, get the OziExplorerCE software, which is also available at the mobilesmania forum

Getting the maps
(a) If you are using Nokia phone, convert any of map image(JPG/PNG/BMP etc) that you have to ogf2 format using this software.
(b) If you are using Windows Mobile, use the Img2ozf application which come along witht he application to convert your files into the ozf2 format
(c) If you are using GPS, you need to calibrate the maps before you first use it. (i.e generating the .map file)

For your convenience, I have given links to some of JPG/PNG maps here. Below are the OGF2 and MAP files for some of these maps. You can store these files directly in the "e:\data\smartcomgps\maps" folder of your phone and get it working right away with or without GPS.
Kolkata OGF2 file
Kolkata MAP file (calibration file for the kolkata map)
If you have any problem or if you wants maps of other places, please leave a comment and I will try to make one.

Thursday, April 24, 2008

Convert your smartphone into a WiFi hotspot

If you have a Wifi enabbled smartphone, this piece of freeware Walkinghotspot will allow you to make it a WiFi hotspot. WiFi clients including your laptop can connect to your phone through WiFi, and access GPRS/3G for accessing internet. I use this feature for browsing the internet from my laptop through the wireless connection.
This avoids you the hassles of connecting bluetooth and installing the drivers in your laptop. Currently it supports only Windows Mobile and Symbian series devices. Works like a charm on my Nokia N80.

Once you register at their website, they will send you a link (For symbian 3rd edition devices this might suffice) which you can access to download the executable.

Tuesday, April 22, 2008

Converting audio files to mp3 using mencoder

Requirements:
Install the Mplayer binaries for your operating system from http://www.mplayerhq.hu/
Command line option:
mencoder -ovc frameno -oac mp3lame -lameopts cbr:br=128 -of rawaudio -o <output_file.mp3> -audiofile <input_file> <dummy_video_file>
Make sure that the play time of the video file is more than the play time of the audio you are trying to convert. In case it is not, you can give multiple video files in the place of one. 

Saturday, April 12, 2008

All free wordwide phone calling

Different providers give free calling to US/Canada from time to time. This blog post is intended to provide a list of free calling to US/Canada. This will be updated when there is a new service , or when services cease to exist. So do check back in to know what is the latest.

1. Earthcaller(Only US/Canada)
They allow FREE PC to phone calls anywhere in US. You can make calls only from a PC.

2. Gizmo combination with Ringbranch (Only US/Canada)
Check out this blog entry to find out how. You can make calls from Gizmo softphone from your PC, or you can use your VOIP phone/ATA device for calling. Right now limited to 1000 minuts of call per month.

3.ViatalkFree(Only US/Canada)

Allows free calling between two US numbers. Enter the two numbers in their website, and they will call and connect both of you. If you reside in another country, you can still work it out if you have a incoming US number mapped to you SIP device(eg sipnumber service)

4. JustVoip (Many countries)
Supported countries :Argentina,Australia, Austria, Belgium, Brazil,Bulgaria,Canada,Chile,Colombia,Cyprus,Czech Republic,Denmark,Estonia,France,Germany,Greece,Hong Kong (+mobile),
Hungary,Ireland,Italy,Japan,Latvia,Luxembourg,Malaysia,Mexico [guadalajara],Mexico [mexico City],Mexico [monterrey],Monaco,Netherlands,New Zealand,Norway,Panama,Peru,Poland,
Portugal,Puerto Rico (+mobile),Romania,Russian Federation,Singapore,Slovak Republic,Slovenia,South Korea,Spain,Sweden,Switzerland,Taiwan,Thailand,United Kingdom,United States (+mobile),Venezuela

You can make free call from this site. You need a phone number in one of the above countries to call to these locations. If you reside in another country, you can still work it out if you have a incoming US number mapped to you SIP device(eg sipnumber service)


5. LDUsa

Calls are limited to 5 minutes. They allow you to make international calls to many international destinations from any phone. You will be given local dial in number and a PIN to call your destination. You do not require any hardware/soft phone. In India, they currently allow calls only to Hyderabad landlines. They are going to introduce calls to other parts on India May 1st

6. Free call to India

By this facilty, you will get a conference dial-in in many countries. People in India can call their own local number to connect to the conference.



Friday, April 11, 2008

Call phones worldwide free

Be aware that in the following method, the calling is FREE for the caller, but the callee incurs local call charges

In an earlier post I had mentioned how to call free to phones in US/Canada . Using this and then registering with rebtel , you will be able to call the following countries.

Argentina Australia Austria Bahrain (Beta) Belgium Brazil Bulgaria Canada Chile China (Beta) Croatia (Beta) Cyprus Czech Denmark Estonia Finland France Germany Hongkong, China (Beta) Hungary Ireland Israel Italy Japan Latvia Lithuania Luxembourg Mexico Netherlands New Zealand Norway Peru Poland Romania Slovakia (Beta) Slovenia (Beta) South Africa (Beta) Spain Sweden Switzerland Turkey United Kingdom United States

Requirements
1. An internet connection
2. A computer
3. Mic and headphone/speaker !!!
4. Help of a friend in US with a US mobile to help in setting things up for the first time.
5. A setup describe in this article

Theory of functioning:
1. Rebtel is a VOIP service, which, among other services, allows you to call a US number, and reaches your destination country through VOIP. From here a local call is made to your destination phone number. The callee has to call back to this local number and both the caller and callee are connected. Total charges - callee incurs local calling charges.

Things to set up:
1. At first, have this setup ready
2. Register at Rebtel
3. Give your Ringbranch number as you number at Rebtel. Keep your own phone number to call in Ringbranch a a firnd's number in US/Canada.
4. On registering to the site, you will get an automated verification call at the friend's number. Once the verification is over, you can put the destination number in ringbranch to whatever was before.

How to add a contact
1. Login to you rebtel account , adn enter your international contact number.
2. Once you enter the number, you will get two numbers - a local number in US, and a local number in your destination country.
3. For every contact, steps 1 and 2 will have to be done. Note down the corresponding numbers for all future calling to these contacts.
4. Enter the US local numbers that you got in your ringbranch contact page.

How to make an almost free call
1. Open gizmo, and call your ringbranch through backdoor.
2. Enter the contact nuber corresponding to the US number of your destination number.
3. Your call will be connected to your destination phone.
4. On connecting the call, tell your callee to call back on the caller id displayed on his phone. This number is the same as the number you got in step 2 in the previous section.
5. You stay on the line, when callee calls back to the number, and both of you will be connected.

Check here to see how rebtel connects your call.

Wednesday, April 02, 2008

Free calls to anywhere in US/Canada using Gizmo & Ringbranch

(Looks like this feature has been blocked by GIZMO. Will keep you updated)
What you need:
1. An internet connection
2. A computer
3. Mic and headphone/speaker !!!
4. Help of a friend in US with a US mobile to help in setting things up for the first time.

Theory of functioning:
1. Gizmo VOIP provides free calling to certain US telephone numbers through their backdoor dialling mechanism.
2. Ringbranch provides a functionality where you can dial into your ringbranch number and call any of your contacts (only US/Canada allowed ; maximum of 100) for free (total 1000 minutes allowed per month)
3. Now, the ringbranch number that you get is a free location if you dial from gizmo.
4. We make use of these facts to make free calls to location in US/Canada.

Things to set up:
1. Register yourself free at Ringbranch . In your profile, set your primary phone number as your US friend's number. Note down your ring branch number. In your profile settings, "When you call your RingBranch number in order to call out to one of your friends, what number do you want displayed on your friends' Caller ID?" , put the choice as "actual number".

2. Download gizmo . Register yourself from the application.

3. From gizmo, call the number 0101-<your ringbranch number>. This will ring your friend's mobile. Ask him to save that number and let you know that number. This is the your gizmo outgoing number.

4. Go back to ringbranch profile settings and put your gizmo outgoing number as your primary phone number instead of your friend's number.

5. Go on and add upto 100 US/Contacts in your ringbranch contacts page.
6. Your settings are finished.

How to make the free call:
1. Open gizmo, and call 0101-<your ringbranch number>
2. You will be greeted by a prompt to enter the number in the contact list that you want to call. Enter the number followed by # .(eg. 15#)
3 Thats it, your call will be connected. If at any time you want to call a new contact, go and update your ringbranch contact list at their website, and start making the call.

You can extend this and use rebtel, to make international calls. I will explain this in a separate post.

Sunday, March 30, 2008

Features of my dream mobile

1. TV-Out
a) Connect the phone output to any TV, and see the vidoes on the big screen.
b) Connect to LCD screen and use your mobile as GPS navigation system in your car.

2. Internal GPS
a) Use smartcomGPS software and maps from google/yahoo for excellent GPS navigation in India.
b) Multiple applications should be able to access the internal GPS simultaneously. 

3. Bluetooth
a) Use your phone as remote control for your computer
b) Use your bluetooth headset
c) Transfer data with other bluetooth-enabled phones

4a. FM Radio

a) Listen to FM stations on the go.
b) Connect FM transmitter to your TV and use the phone for listening without disturbing anybody

4b. Stereo FM Transmission
(a) You can play your favourite music on your mobile, and transmit it over FM, and let the car radio pick it up
(b) Play music in your mobile and let the audio system pick it up over FM and play it aloud.

5. Full fledged operating system like Symbian/Windows Mobile/Linux
a) Gives you the flexibility to install applications.
b) Use your mobile like a small computer.

6. External memory support
a) Either the mobile should have enough internal memory or it shud have external memory card support. Atleast 2 GB space is required.

7. Music / Video Playing
a) Watch your favourite videos/music while you are travelling
b) Standard 3mm jack to fit in any of your normal headphones/amplifiers

8. Camera
a) You dont have to carry a separate digital camera/ camcorder . (Minimum 5MP camera with atleast 3x zoom capability for normal usage)

9. 3G/WCDMA/UMTS
3G services have not yet started in India, but they are slated to start in 2008. It might be a good idea to have 3G support in the mobile.

a) Browse at broadband speeds
b) Make video calls to others having 3G handsets.
c) You will be able to use your mobile in Japan and South Korea (who have proprietary CDMA systems for mobile telephony, but also have a separate WCDMA network)

10. Quadband
a) With Quadband you should be able to use your mobile anywhere in the world. (except Japan and South Korea, unless you have 3G)

11. QWERTY keyboard
a) Use your mobile as a small computer wherever you go using the QWERTY keyboard.

12. Touch screen
Touch screen with iPhone like features.
The phone should still have normal keypads, so that I can type with just one hand.

13. Battery life
For a heavy user of GPRS/WiFi, battery backup is essentail. Recently companies are coming up with chargers using human motion.


14. Standby battery accessories


15. VOIP Call Support

Support for using Voip over 3G/WiFi networks. This will help to reduce your long distance calls when you are at home, or at a hotspot.

16. Minimum 128MB of internal memory 
Enough RAM will allow you to run multiple applications at the same time.


17. Accelerometer
Allows you to align landscape/portrait, by just turning the phone.(It should also be possible to disable this feature through settings)


18. Call quality 
Last but the most important thing, I should be able to make calls and talk to people !!!

Thursday, March 13, 2008

When Grandma goes to court


Lawyers should never ask a Mississippi grandma a question if they aren't prepared for the answer.
In a trial, a Southern small-town prosecuting attorney called his first witness, a grandmotherly, elderly woman to the stand. He approached her and asked, 'Mrs. Jones, do you know me?' She responded, 'Why, yes, I do know you, Mr. Williams. I've known you since you were a boy, and frankly, you've been a big disappointment to me. You lie, you cheat on your wife, and you manipulate people and talk about them behind their backs. You think you're a big shot when you haven't the brains to realize you'll never amount to anything more than a two-bit paper pusher. Yes, I know you.'

The lawyer was stunned. Not knowing what else to do, he pointed across the room and asked, 'Mrs. Jones, do you know the defense attorney?'

She again replied, 'Why yes, I do. I've known Mr. Bradley since he was a
Youngster, too. He's lazy, bigoted, and he has a drinking problem. He can't build a normal relationship with anyone, and his law practice is one of the worst in the entire state. Not to mention he cheated on his wife with three different women. One of them was your wife. Yes, I know him.'

The defense attorney nearly died.

The judge asked both counselors to approach the bench and, in a very quiet voice, said,

'If either of you idiots asks her if she knows me, I'll send you both to the electric chair.'


Monday, March 10, 2008

UTV World Movies - The new movie channel

This is something which I was waiting for, for such a long time - a movie channel for international movies. Checkout http://www.utvworldmovies.com/ for their programme guide.

They are currently playing English, Spanish, Chinese, Dutch, Polish andFrench movies. Some of the movies I like watching during the past month are :
a) Koma (Chinese, Thriller)
b) The Penknife (Dutch, Drama)
c) The longest penalty in the world (Spanish, Comedy)
d) My name is Justine (Polish, Drama)

Thursday, March 06, 2008

Download free Germany/delhi/india/bangalore/pune/chennai/mumbai/kolkata/karnataka/trivandrum/hyderabad/andhra/sikkim map

Downloadable maps of Germany/Delhi/bangalore/chennai/pune/mumbai/trivandrum/karnataka/kolkata/hyderabad/andhra pradesh/Cochin/Mexico City/Helsinki/Stockholm/Springfield and major cities in India. Click on the thumbnails to download the full image size. The links will take you to rapidshare download page. Just click on the "Free" button and then enter the CAPTCHA code to download it free.

Bangalore Map (Zoom level 3) (21 MB)

Click on the thumbnails to download the full map

More detailed maps are here

Bangalore Sector 1 (0.5 MB)

Bangalore Sector 2 (1.5 MB)

Bangalore Sector 3 (2.2 MB)

Bangalore Sector 4 (1.0 MB)

Bangalore Sector 5 (0.5 MB)

Pune Maps (2MB)

Click on the thumbnails to download the full map

Chennai Maps

Zoom level 1 map (17MB)



Zoom level 4 map (4MB)

Click on the thumbnails to download the full map

Mumbai Maps (5MB, 8MB, 5MB)


Click on the thumbnails to download the full map. There are three sections for the Mumbai map. Click on them individually to download.

India Map (6725x6131) (3 MB) (ogf2 format) (ozf2 format)

Karnataka Map (3840x3840) (3 MB)

Kolkata Map (7733x7163 ) (10 MB)

Trivandrum Map (5120x3840) (2 MB)

Hyderabad zoom 3 Map (8 MB)

Hyderabad upper portion zoom 1 Map (16 MB)

Hyderabad lower portion zoom 1 Map (16 MB)

Andhra West Map (12.3 MB)

Andhra East Map (12.3 MB)

Sikkim Map (1.3 MB)

Germany

Part1(42MB)

Part2(64 MB)

Part3(62 MB)

Part4 (65MB)

Delhi Map
Delhi-Detailed-Part1(12MB)
Delhi-Detailed-Part1(11MB)

Delhi-Coarse Map (3 MB)

Cochin Map , Kerala, India(1.5 MB) OGF2 OZF2

Agra , Uttar Pradesh, India(5 MB)

Ahmedabad , Gujarat, India (7 MB) OGF2 format OZF2 format

Chandigarh , India(6 MB) OGF2 format OZF2 format

Dehra Dun, Uttaranchal, India (3 MB)

Jaipur , Rajastan, India(6 MB)

Lucknow, India (7 MB)

Mangalore, India (2 MB)

Panaji , Goa, India (3 MB)

Patna, Bihar, India (4 MB)

Sholapur, Maharashtra, India (2 MB)

Trichy, Tamil Nadu, India (2 MB)

Kuala Lampur , Malaysia (8 MB)

Springfield, Missouri, USA (7 MB)

Mexico City (8 MB)

Copenhagen (JPG) (2 MB) OGF2 OZF2 (contains calibration map file)

Stockholm (2 MB)

Helsinki (2 MB)

Bellary, Karnataka (2.5MB)

Chattisgarh, India (2 MB)

Davangere, Karnataka, India (2MB)

Goa, India (3.6MB)

Haifa and Tel Aviv , Israel (2.5MB)

Indore, India (4.5 MB)

Kolhapur, India (1.2 MB)

Nagercoil, Tamil Nadu, India (165 KB)

Panaji, Goa, India (700 KB)

Salem, India (2.8 MB)

Srinagar, India (2.7 MB)

Surat , India (3.2 MB)

More maps are being added. On the hot list are Cochin, Chandigarh, Ahmedabad, Trichy.

If you need maps of any other place in india or abroad, please leave a comment, and i will try to add it.

If you trying to use maps with your nokia mobile, I will be adding an article on it soon.

Check here to find out how to download maps like these.

Wednesday, March 05, 2008

Download free maps from Google maps using Perl

The following is a step-by-step guide for downloading google maps to your harddisk and open it with your favourite image viewer.

Requirements:
1. Internet connection
2. Perl installed in your machine (Windows version available from http://www.activestate.com/store/freedownload.aspx?prdGuid=81fbce82-6bd5-49bc-a915-08d58c2648ca) In fact, you can use any scripting language you are conmfortable in.
3. Download wget executabel (Free windows version at http://users.ugent.be/~bpuype/cgi-bin/fetch.pl?dl=wget/wget.exe )
4. Irfanview image application (Free version at http://www.irfanview.com/main_download_engl.htm)

Procedure:
1. First go to http://maps.google.com and browse to the location you want to see.Move around in the map and in the bottom status window, you will see some thing like this:
http://mt3.google.com/mt?n=404&w=2.69&hl=en&x=54&y=108&zoom=9
2. Note this down. The value for x and y will depend on the location that you have browsed. The value of "zoom" will depend on your current zoom level. Also note down the values at the four corners of the area that you want to make a map of. Lets say thay are x varies from 1072 to 1090 and y varies from 600 to 900.
3. Using notepad open a file and type the following lines into it. Modify the $x1, $x2, $y1, $y2 ,$zoom and $step variables from step 2. Also modify the wget statement with the values of "n" and "w" from step 1:

#-------------------------------------
$x1=1072;
$x2=1090;
$y1=600;
$y2=900;
$zoom = 9;
$step = 1 ;
for($j=$y1;$j<=$y2;$j++) {
for($i=$x1;$i<=$x2;$i++) {
`wget -O $j.$i.png "http://mt3.google.com/mt?n=404&w=2.69&hl=en&x=$i&y=$j&zoom=$zoom"` ;
}
}
#-------------------------------------


4. Copy the "wget.exe" to the same directory as the above file.
5. Open command prompt , go to the same directory and type:
perl
6. The Perl will run and download all the images as small small tiles.
7. Open irfanview. Choose "Files->Thumbnails"
8. In the thumbnails window, choose all the png files which were downloaded earlier. Right click and choose "Create content sheet..."
9. In the dialog box, enter the image width , height etc using the values used above.
For eg, image width = (1090-1072+1)*256
image height = (900-600+1)*256
column width = (1090-1072+1)
row = (900-600+1)
Chooe spacing as 0.
10. Create the output, and that is your map file !!!!!

Monday, February 25, 2008

Indian Online Bus Booking Sites (Luxury/Volvo Buses)

KPN Travels
http://kpntravels.in/
KPN Travels is one of the most reliable luxury bus operators to regions in Tamil Nadu, Kerala and Bangalore.

Redbus
http://redbus.in/
I have never tried booking through these guys, but these guys seems to support a lot of transport companies to a wide variety of places in south and central india.

Parveen Travels
http://www.parveentravels.com/
They cover most of Tamil Nadu and Bangalore.

CustomerNeedz
http://www.customerneedz.com/
This site is like redbus, which cater to a variety of bus operators, covering mostly South India

TicketVala
http://www.ticketvala.com
They include bus operators throughout India.

IndiaBusTickets
http://www.indiabusticket.com/
At this point of time, it caters to a few cities in Tamil Nadu only.

VRL Travels
http://www.vrlgroup.in/
Covers South India

ABT Travels
http://www.abtxtravels.com/
Covers major cities in Tamil Nadu and Karnataka

Rathimeena
http://www.rathimeena.co.in/
Connects places inside Tamil Nadu

Please also refer to other services listed in http://blogs.ibibo.com/premnewzea/Bus-Tickets-Online.html

Anger Management


Monday, February 18, 2008

Downloading youtube videos into FLV / Divx formats

This script was slightly modified from the older version which was taken from http://www.perlmonks.org/?node_id=570467
You need to have PERL, wget and mencoder installed to run this. Can be done from either Windows/Unix environment.
(If you do not know how to set up these in Windows, I will explain it in another entry)
 
Usage:
1. First create a file called "list" which contains a list of youtube URLs to be downloaded
2. In the command line type "perl <this file>"
 
Working:
An FLV file as well as the converted AVI file (in Divx format) are stored in the current directory
 
#!/usr/bin/perl
use warnings;
use LWP::Simple;
use LWP::UserAgent;
open(FPLIST,"list") || die("cant open list\n");
while(<FPLIST>) {
   chomp($_);
   $link = $_;
   # shamelessly reversed engineered from a python script :-)
  
   print "startring first page retrieval : $link\n";
   my $urlin  = shift || $link;
   my $content = get( $urlin  ) or die "$!\n";
   print "done first page retrieval\n";
  
   # regex for 2 key text strings which identify the video file
   # the second one $2 is unique for each download attempt
   $content =~ /watch_fullscreen.*video_id=([^&]+)&.*t=([^&]+)&/ ;
  
   print $1, "\n" , $2, "\n"; 
   my $file=$1;
   my $infile = $file.'.flv';  #add a .flv extension
  
   print "gettin video file $get_url\n";
   system("wget -O $infile \"http://www.youtube.com/get_video?video_id=$1&t=$2\"");
  
   #convert the FLV file to Divx AVI
   system( "mencoder  $infile -oac mp3lame -ovc lavc -ffourcc DX50 -o $file.avi" );
}