Tags » PHP 2

Round in PHP

it is

float round ( float $val [, int $precision = 0 [, int $mode = PHP_ROUND_HALF_UP ]] )


echo round(3.4); // 3
echo round(3.5); // 4… 13 more words


Simple PHP Hit Counter

No need for a service when you can do it for free!

On many pages it is common to have a generic hit counter displayed at the bottom of each page. 177 more words

Hit Counter

mysql_real_escape_string returning an empty string

This can be a little confusing.

The actual parameters for mysql_real_escape_string are not just $unescaped_string, but also $link_identifier. When the latter is left empty, it defaults to the last used connection opened by mysql_connect, so most of the time it’s unnecessary to specify. 117 more words


Free and Easy way to convert URL/HTML to PDF

Found this tool that really works like a charm, able to convert a dynamically generated HTML and then pass on the URL to this API, the rest are all epic. 17 more words


What is PHP? What is a PHP File?

PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. As of January 2013, PHP was installed on more than 240 million websites (39% of those sampled) and 2.1 million web servers. 197 more words


The Art of Debugging - applied to PHP

Creating a good software involves several skills – analytical thinking, algorithms, design, coding etc and last but important – debugging. Debugging is an art of tracing and fixing the bugs, mastery of which saves a lot of time of the developer. 1,769 more words


Improve Web Security in PHP and/or Apache - Content Security Protocol and X-Frame-Options

To guard against UI-Redressing, Click Jacking or xss you can use the CSP http header which is compatible with newer browsers.  To block iframing of your site in most browsers you can use x-frame-options.  182 more words