HTTP Request using cURL for Windows

There’s a variety of ways to perform http request without using your web browser, i.e. using your command prompt. We could use wget for most major Linux distributions, but what about Windows? Recently I’ve found out that cURL might get the job done.

cURL is a command line tool for transferring files with URL syntax. It is free and open source software. One of the use for cURL is to automate unattended file transfers. For example, automating file downloads or getting html output from sites, via a command prompt, a batch file or scheduled job. It is also a good tool for simulating a user’s actions at a web browser, thus a very good tool to perform web application tests.

How to use cURL:

1. Download cURL. Select appropriate version based on your OS.
2. Extract the zip file.
3. Place the “curl.exe” under your C:\WINDOWS directory.
4. Execute it directly from your command prompt:

C:\>curl http://www.wordpress.org

You will see a bunch of http response coming out of your command prompt.

Output http response and save the page locally :
C:\>curl http://www.mydomain.com/mypage.php > mypage.html

Downloading using cURL:
C:\>curl http://www.mydomain.com/downloads/myfile.zip

HTTP Post using cURL:
C:\>curl -d "string_to_post" http://www.mydomain.com/mypage.aspx

There’s a lot more features for cURL, and the manual usage available here.

Google Chrome, a browser by Google

It seems now Google is working on their own web browser, Google Chrome. It’s going to be designed from scratch based on today’s web application needs, and it’s open source!

Here’s the link to the whole comic book explaining Google Chrome.

Taken from the official Google Blog.

UPDATE: Google Chrome site just launched.

UPDATE 2: I’ve just installed Google Chrome on my Windows 2003 (this post is edited using Chrome). I have to admit, the features and stability really impresses me. There’s an import feature to migrate all your bookmarks, form fields and saved passwords from Firefox or IE. Bookmarking a page is as easy as a single click.

All the tabs are detachable to create a new window by simply dragging the tab, and much more. I just can’t wait for them to release a Linux version of Chrome.

Few screenshot is available after the jump.

Ramadhan

I would like to wish a Happy Ramadhan to all Muslims all over the world.

From Wikipedia:

Ramadan is a Muslim religious observance that takes place during the ninth month of the Islamic calendar, believed to be the month in which the Qur’an began to be revealed. It is the Islamic month of fasting, in which Muslims don’t eat or drink anything from sunrise until sunset. Fasting is meant to teach the person patience and humility. Many scholars are of the view that competing in sports or exercise should be refrained during the daylight hours since it causes one to be more thirsty, and thus, less patient. Most people who keep fasts choose to exercise in the night after the fasts are broken.

p/s.: Now where the heck is my Hari Raya mp3’s collection, anyway?

Merdeka! Happy 51st Independence Day, Malaysia

31st August 2008. It’s Malaysia’s 51st Independence Day. Also known as “Hari Merdeka” by Malaysians.

From wikipedia:

Hari Merdeka (Independence Day) is a national day of Malaysia commemorating the independence of the Federation of Malaya from British colonial rule. In a wider context, it is to celebrate the formation of Malaysia.

Are we truly free?

Independence means that the nation is free. For that to be true, they must at least be able to think freely, express and exchange opinion, and, obtain and disseminate information without fear or favour.

Anyway, Happy Birthday Malaysia.