Thursday, May 27, 2010

Detecting IP Address Behind The Proxy

This is the short tutorial for detecting the IP address of website's visitors. If you familiar with PHP, you can use the $_SERVER['REMOTE_ADDR'] superglobal variable to detect the visitor's IP address. What if the visitor is browsing from behind the proxy. Of course you will only get the proxy IP address not the real IP address of the visitor.

There is one more superglobal variable to detect the real IP address of the visitor. It is the $_SERVER['HTTP_X_FORWARDED_FOR'].

This simple program will demonstrate the detection of IP address and the IP address that "hidding" behind the proxy.

echo "You came from ".$_SERVER['REMOTE_ADDR'].".";
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
if (preg_match("/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]| [01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4]
[0-9]|[01]?[0-9][0-9]?)$/i", $_SERVER['HTTP_X_FORWARDED_FOR']))
{
echo "But, your real IP address ".$_SERVER['HTTP_X_FORWARDED_FOR'].".";
}
else {
echo "But, your real IP address is unknown.";
}
}
?>

Wednesday, May 26, 2010

GOOOOGLING Microsoft

This is truely amazing,even still i dont understand ...........
well what i am speaking about is this
check it out for yourself and see the search results ...... you can also type google and search!!!


[microsoft.gif]

Friday, April 9, 2010

Sudoku for Software Engineers



I do not like to post just a picture, But this pic below is worth it. Try solving it :P:P:P:P


Thursday, April 1, 2010

Fact: Pidgin Stores Passwords in Plain Text

I learned recently that my favorite opensource and multi-protocol instant messenger client stores my passwords in plain text. Yeah thats right! once other users got hold with your machine and type the following "%appdata%\.purple\accounts.xml" on the run or search box then say goodbye to your privacy. The xml file where pidgin stores your passwords are not encrypted and can be open as plain text using your favorite text editor as shown below.
What were they (Pidgin developers) thinking? Read here

I therefore conclude that the best way to secure password is not to allow your IM client store your passwords.

Wednesday, March 31, 2010

How To Move Windows Application Or Games To Another Drive

The default installation location of most applications is in C: or the default Operating System drive. Overtime, this drive can run out from free space specially with the large hard disk free space requirement of new release applications.
The old way to move installed application is to uninstall the application and reinstall it to a new hard drive. Fortunately there is a better way to do it and it is by using a Windows built-in command line utility called Mklink (Similar to "ln -s" of linux). It is use to create symbolic links or symlinks and hard links in MS Windows. Mklink requires administrative privileges.

To move a Windows Application using Mklink, follow these steps.

1. Use Windows Explorer to cut and paste the application's directory. For example, cut and paste this folder "C:\Program Files\Microsoft Visual Studio" to"D:\Microsoft Visual Studio"

2. Open the command prompt as administrator.

3. From the prompt, type: mklink /J "mirror folder" "current location of the files". For example, mklink /J "C:\Program Files\Microsoft Visual Studio\", "D:\Microsoft Visual Studio\".

4. If successful, the utility will display a result similar to this:
Junction created for C:\Program Files\Microsoft Visual Studio\ <<===>> D:\Microsoft Visual Studio\

Remember that the application your moving should not be currently in use. Mklink is available in Windows Vista and Windows 7.