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 18, 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
10 useful tips to make your php application safe. Good practices in creating a secured web application

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

Posted by Stanislav Furman on February 15, 2012

From time to time we create HTML/CSS templates where we need to center a div or an image. For some newbies it poses a problem. In this blog post I'll show you one of the ways of CSS centering.

Suppose you have a div or an image (with the size 150px X 100px) that should be centered on the web page. First step you do is the following CSS:


centered {
  position:  fixed;
  top:  50%;
  left:  50%;
}

CSS Centering Trick (image 1)

Continue reading

12 SEO tips that everyone should know

Posted by Stanislav Furman on February 10, 2012
Learn about most powerful and useful SEO practices.