Tuesday, September 12, 2006

Maybe Last Post on Sumitworld.blogspot.com

Hi, I am not so happy saying that, but yes its last post for now on this blog. Hey that doesn't mean i will not write ... I have new Domain as you know and today I finally manage to transfer free blog account to my own Domain Find my blog on http://www.sumitgupta.net. There is interesting story behind Transfer, well I was planning to shift my blog from 2 months, but really doesn't get time to backup my blog and Shift it to Wordpress , but finally I manage to write code for that, yesterday. And When I transfer it to my wordpress test installation it works fine. Than I start exploring "import" function in word press... It has inbuilt transfer module that hardly take 3 min of my life to transfer blog ..wow and people say I am one of decent programmer . But All wells if end well ( i heard that some where ) and since I am happy to get new domain... Good bye to SUMITWORLD @ BLOGSPOT.COM its now really Sumit's WORLD at sumitgupta.NET . See you soon at new home.... Bye from here Sumit Gupta

Monday, September 04, 2006

Another idiotic Story

Hi, I face a new problem now a days while surfing internet website. As I am working on opensource software now a days, I some how get to some sites, that display a Warning message when viewed through "Internet Explorer" ... Warning is something like you are view some blah blah kind of web browsers or IE. If you are view IE than some site is not viewable as other browser can easily replicate its "USER AGENT" string and does false detection.... interesting na ...false USER AGENT for IE. hmm and what more they prefer FireFox. If I remember correctly as I use that tool myself for Firefox, will easily allow anyone to switch to popular browser User Agent ... so firefox does that wrong User agent thing not IE itself. So why Internet Explorer is punished ? Sumit Gupta

Two Forms in ASP.Net

Hi, As any other ASP.Net developer, I was not feeling comfortable with only one form concept that ASP.Net has (not sure about v2.0 as never work on it). Also, when you have to put something like google Search or other such service on your Site and place for such "explicit" forms are in middle of your Only "Runat Server form" how will you put the other forms ... Well what I did is simply use IFrame, capabilities of web browsers. I simply make a HTML page of Google search, and using IFrame call that page. now since it load explicit HTML page, you don't have to worry about nested form, but simply about how it looks. though It has a disadvantage that , on older browser your site might not be viewable, but who cares about old stuffs ... every body you should get new browser after all browser are free :) Sumit Gupta

Sunday, September 03, 2006

Linux User authentication using PHP

Hi, in one of my last post i try to define how linux store its password. Today I will be putting Complete PHP code for it. Just run it on your local server(mind it your Http server must be running as root user in order to use this script ) Its a raw way of doing password matching and shouldn't be used for commerical application or servers. its purely Learning script So here goes the script 6 && CRYPT_MD5 == 1) { $salts = explode("$","$userlist[1]"); $salt = "\$1\$".$salts[2]."\$"; $gen_password= crypt($password,$salt); if ($gen_password == $userlist[1]) { $UserMatch = true; } else { $UserMatch = false; } } else { $UserMatch = false; } break; } } return $UserMatch ; } if (ReadUser("sumit") == true) { if (MatchPassword("sumit","sumit") == true ) { echo "Login successful"; } else { echo "Login unsuccessful"; } } ?> Hope that helps learn understanding linux passwd and shadow usage. Sumit Gupta