code – Internetblog.org.uk https://www.internetblog.org.uk Web hosting, Domain names, Dedicated servers Fri, 29 Jan 2016 11:05:52 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.5 https://www.internetblog.org.uk/files/2016/01/cropped-favico-32x32.png code – Internetblog.org.uk https://www.internetblog.org.uk 32 32 How to Insert HTML5 Video https://www.internetblog.org.uk/post/1374/how-to-insert-html5-video/ Mon, 31 May 2010 22:32:17 +0000 http://www.internetblog.org.uk/post/1374/how-to-insert-html5-video/ Big Buck Bunny movie in html5 video
We have been covering the developments of HTML5 in the Web world, but we have not yet explored exactly how to get HTML5 video onto a website. The good news is that embedding HTML5 video is painfully easy. It only requires one basic tag: <video> . To make something a little fancier, website creators can add additional attributes.

HTML5 video will take the following format on your website:

<video src="crazycat.ogg" controls="controls">
We're sorry, your browser does not have HTML5 video support. Please download the video
</video>

There are a number of additional options:

autoplay – The video will start playing automatically

controls – Displays player controls

height – specifies height of video

width – specifies width

Once you have the video the way you want it, paste the code into your website, and it will work in any browsers that support HTML5 video. Since some do not, you should provide an alternate method of viewing the video as well.

]]>
Adding "last modified" code to your PHP website https://www.internetblog.org.uk/post/880/adding-last-modified-code-to-your-php-website/ Wed, 13 Jan 2010 16:17:43 +0000 http://www.internetblog.org.uk/post/879/adding-last-modified-code-to-your-php-website/ PHP code
Question: How can I use PHP to display the “last modified” date on my website’s main page?

Answer: For any type of website that includes factual information, it is important to tell users when the information was added to the site. Information that was relevant five years ago might not be so today. Using a “last modified” line at the bottom of the page is a standard way of accomplishing this.

If you are running PHP and have a content management system, it is sufficient to put the “last modified” code at the bottom of the index.php page or its corresponding template. That way, every time someone accesses any page on the site, the last modified code will be executed.

Edit your PHP file, and enter the following code:

The information after “//” is just a comment to remind you of what the code does. Save the file and re-upload it to your server (if necessary), and you are all done.

Photo: Flickr

]]>
PhpSecInfo: PHP security information tool https://www.internetblog.org.uk/post/866/phpsecinfo-php-security-information-tool/ Fri, 08 Jan 2010 17:18:38 +0000 http://www.internetblog.org.uk/post/865/phpsecinfo-php-security-information-tool/ PHPSecInfo screenshot
Allowing access to any type of scripting on your web server opens the door for security problems. You never know when an attacker might randomly (or purposely) select your server as a target. Any running scripts have the potential for exploitation. PHP is no exception, and taking steps to secure PHP goes a long way in preventing an attack.

PhpSecInfo is one of the steps you can take. It is a small information tool that reports security information about PHP and offers suggestions on how to improve them. It is probably best described as a low level security tool that can be useful in helping identify problems before moving up to higher security auditing.

PhpSecInfo does not examine your PHP code to see if you have any possible security holes. Thus, it states clearly on its website that it is not a replacement for secure coding practices. What it can do is give you information about the PHP environment itself and how it is setup on your server. It is very easy to install, as it is itself a PHP script. Just uncompress it in a document directory on your server and open the URL pointing to it in a browser. PhpSecInfo is available for download from the PHP Security Consortium website and is free software released under the New BSD License.

Source and Photo: PHP Security Consortium

]]>