Posts Tagged with "tricks"

Redis: How to delete keys matching a pattern

Posted by Stanislav Furman on April 10, 2014
How to delete keys matching a wildcard pattern in Redis

File search and wildcards in PHP

Posted by Stanislav Furman on June 7, 2013
How to search files in PHP using wildcards and patterns

How to trim array elements in PHP in one shot

Posted by Stanislav Furman on April 17, 2013
Remove all leading and trailing white spaces in all PHP array values.

How to get most accurate visitor's IP address in PHP

Posted by Stanislav Furman on April 15, 2013
Learn how to get most accurate user's IP address in PHP.

Reading file list from a mapped Windows network drive

Posted by Stanislav Furman on March 25, 2013
How to read a file list from mapped Windows network drives

CSS rounded corners

Posted by Stanislav Furman on February 26, 2012

Basic approach and main idea

Very often, web designers use CSS rounded corners to make websites nicer. This blog uses rounded corners too. You could use different methods to create rounded corners on your web site, but from my point of view the simplest one of these methods is the method that uses CSS3.

Unfortunately, this method won't work in IE (what a surprise!), but, fortunately, there is a hack exists that can fix this problem.

For most of web browsers the following code will work:


<style>
#container {
  width: 200px;
  height: 200px;
  background-color: #cccccc;	
}
.rounded {
  -moz-border-radius: 10px; /* Works in Firefox */
  -webkit-border-radius: 10px; /* Works in Safari, Chrome */
  border-radius: 10px; /* It's CSS3 */
}
</style>

<div id="container" class="rounded"></div>
Continue reading

How to secure your php application

Posted by Stanislav Furman on February 21, 2012

Working on web projects you should consider most common dangers such as XSS ("Cross Site Scripting"), SQL Injection, Session Hijacking, Spoofed Form Submissions, etc. This little guide will help you to understand basics of web security and it will help you to protect your web applications against possible attacks.

Remember that security must be balanced with expense. Don't use paranoidal security approaches if it is not really needed.

Please note that this post covers only basic security approach which is quite enough for most of web sites but not enough for large, e-commerce projects. However, listed measures are fundamental for all types of web applications.

Continue reading

CSS Centering Trick: How to center a div or an image?

Posted by Stanislav Furman on February 15, 2012
How to center an item in HTML using CSS.

12 SEO tips that everyone should know

Posted by Stanislav Furman on February 10, 2012

1. The first thing that you have to know - content is your number one and it's your primary priority. Therefore, make sure that you publish good, clear and unique content that is based and focused on your target keywords.

2. Quality backlinks is your number two. Buliding of a network of backlinks is a very important thing in terms of Search Engine Optimization. Make sure backlinks contain your keywords or key phrases between the tags.

3. Remember that one single link from a good site can beat 10 links from other 10 web sites with poorer quality.

Continue reading