Wednesday, December 10th, 2008
Here is a simple php code to hide the image address of our website. It can use to hide url of flash too.
< ?php
$image_path="images/path/to/";
$image_file=$image_path.$_GET['name'];
$sTmpVar = fread(fopen($image_file, 'r'), filesize($image_path));
header("Content-type: image/* ");
echo $sTmpVar;
?>
(more…)
Popularity: 3% [?]
Posted in PHP | No Comments »
Monday, June 23rd, 2008
As I mentioned before in How to Include Subject, CC, BCC, and Email Body in Email Links, you are creating a risk to get spam if you simply placing email addresses on a page without encoding them.
Some websites using “[at]” to replace “@” and email will look as “name [at] domain.com”. This is a good idea for personal websites since nobody challenge you. In commercial, many clients wouldn’t allow you to use “name [at] domain.com” this format. They are not web designer and they don’t understand how spam prevention works, or even care for that matter.
I have this method originally from david walsh blog. Its author have a quick PHP script that you can use when putting raw email addresses on a page:
(more…)
Popularity: 20% [?]
Posted in Javascript, PHP, Web Tools | 1 Comment »
Wednesday, February 27th, 2008
Hands up all those who have ever needed to have some kind of style sheet switcher on their site. Yep, that’s what I thought, at least a couple of you! Seriously though, with the current move toward more fully accessible websites, the need for various stylesheets to be attached to your pages has become more of a neccessity than ever before. Indeed we use the following solution ourselves and you can see it in action by clicking on the ‘Zoom’ (then ‘Zoom Out’) button at the top of the page.
What is this?
Essentially what you have is an array of predefined stylesheets that are called and set to and from a cookie (this cookie stores a numerical value representing the stylesheet number that is selected). Make sure you advise visitors you use cookies in your terms and conditions. If the visitor has chosen to view the site in a style other than the one defined as default, then when they return to the site at a later date, it should be presented to them in the style that they were previously viewing in. Of course this is fine as long as your visitor has Javascript enabled in their browser so that the cookie can be set and retrieved, but what if they don’t? Well the script will still work by making use of PHP SESSION variables to store the same data. This does mean that the style sheet selected will not be stored on the clients machine for future use, but hey, we can’t have it all right?
(more…)
Popularity: 13% [?]
Posted in CSS, PHP | No Comments »