Skip to main content


Showing posts from February, 2012

PHP Security Tips

Today PHP emerged as one of the leading programming languages used in web development. It had increased the responsibility of PHP programmers to save web pages from security threats. Some holes in programming can damage the whole website. Sometimes programmers, in most cases beginners, are not aware of these security holes. In this tutorial we are going to discuss where could be the problem and we would be able to fix them. 1) Global Variables (regiser_globals): You should do your best to write your scripts so that they do not require register_globals to be on.  Using variables as globals can easily lead to possible security problems.  For example <?php // define $authorized = true only if user is authenticated if ( authenticated_user ()) {      $authorized  =  true ; } // Because we didn't first initialize $authorized as false, this might be // defined through register_globals, like from GET auth.php?authorized=1 // So, anyone can be seen as authentic

Java : Convert jar file into exe file in Windows

Recently I had developed a desktop application in Java. After completion of my source code i created a jar file of the package named tool.jar, but using .jar file is not that user friendly so i decided to go with .exe file. Here are the following steps using JSmooth to create .exe file from .jar file. 1)  Download exe file jsmooth-0.9.9-7-setup.exe using following link: \ 2) Run downloaded exe file. Following window would appear. 3) Go to Application tab and set the Main class file. Put the same name which you had used in netbeans/eclipse IDE project as Main Class. If the jar file is embedded in your package check the box ‘Use an embedded jar’. Put full path of the jar fiile of your package. In Classpath mention all the libraries you have used in the project and the jar file. So here you are specifying the full code you needed to run your application. Note : You can ad

!important Statement in CSS

As the name indicates it’s an important statement in CSS. From interview point of view too it’s commonly asked question even from the back end programmers. If you will search in google about the !important statement you will find a list of pages. I am writing about it to include everything possible under this topic and to keep it in my mind for times. What is !important Statement? The !important statement is actually a keyword you can use at the end of CSS property. It would give more importance to that statement. For example : p {margin-left: 10px !important} How it works? Normally what happened, when you have two statements with same property and different values then as per the CSS rules, recent one would be used. For example : p{margin-left : 10px} p{margin-left : 20px} in this case 2 nd one would be used. But when you use !important statement as following : p {margin-left: 10px !important} p{margin-left : 20px} then the first one wi