PHP Easter Egg

Posted by admin in Internet, Tips Trick... | 08.31.2006 - 6:18 am


There is an interesting little Easter Egg that is present in versions of PHP 4.x and 5.x, which allows you to view an image of a dog or in some cases a rabbit on almost any website/server that is using PHP.

To access the Easter Egg all you need to do is append the following string to any URL that is a PHP page:

?=PHPE9568F36-D428-11d2-A769-00AA001ACF42

For Example:-

http://www.php.net/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42

Technorati Tags: , , ,


If you enjoyed this post, make sure you subscribe to my RSS feed!


Windows Vista Prices Leaked

Posted by admin in Internet, Tips Trick... | 08.29.2006 - 1:22 am

According to Ed Bott of ZDNet, Microsoft has accidentally leaked some details of the price of its next-generation operating system.

The Retail Pricing page at Microsoft Canada lets you choose a product name from a dropdown list and see the current pricing.

Leaked Prices:-

FULL versions (all prices Canadian)

* Windows Vista Home Basic, $199

* Windows Vista Home Premium, $239

* Windows Vista Ultimate, $399

* Windows Vista Business, $299

UPGRADE versions (all prices Canadian)

* Windows Vista Home Basic Upgrade, $99.95

* Windows Vista Home Premium Upgrade, $159

* Windows Vista Ultimate Upgrade, $259

* Windows Vista Business Upgrade, $199

(Source)

Technorati Tags: , , ,

If you enjoyed this post, make sure you subscribe to my RSS feed!


Embed Images into a WebPage using PHP

Posted by admin in Internet, Tips Trick... | 08.27.2006 - 5:32 am

It’s possible to embed images into your web-page using php, such that you have just one single file as your webpage. There are no links to other images, just one single file will contain the whole web-page including all the images in it.

To do this::
1. You need to encode your images using base64_encode() function in php.
You can write an elaborate code for it .. but you can use this simple script called base64img
Download the Script | See a Demo of the Script

2. As a result you will get a code looking something like this ::

function img()
{
header("Content-type: image/gif");
header("Content-length: 102");
echo base64_decode(
'AAABAAEAGRcAAAEAGABYBwAAFgAAACgAAAAZAAAALgAAAAEAGA'.
'AAAAAAAAAAAGAAAABgAAAAAAAAAAAAAAAzMzMzMzMzMzMzMzMz'.
'MzMzMzMzMzMzMzMzMzMzMzMvLzszMzMdHWYzMzMvLzozMzMzMz'.
'MzMzMzMzMzKipGMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMz'.
'MzMzMzMzMzMzTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'.
'');
}

much longer than this .. of course)

Create such functions for all the images you need to put up. Say you need to put 3 images, then rename the function to img_1(), img_2() and img_3() repectively and copy-paste it anywhere in your php file.
(as the encoded data is really long so better put at the end )

3. Now write the following code at the top of your php file

if (isset($_GET['img']))
{
switch ( $_GET['img'] )
{
case '1': img_1(); break;
case '2': img_2(); break;
case '3': img_3(); break;
default: break;
}
die();
}

Remember to put this code at the TOP of the php file. You should put it before you ‘echo’ anything else or write anything in html ( i.e. before ,etc tags ).
This is necessary as you may get “Warning: Cannot modify header information - headers already sent” error otherwise and it wont work.

4. Now you can embed image in that page or any other page using the image adress as.

http://www.yourwebsitename.com/yourpage.php?img=1

What we are doing here is that whenever we need an image, we call the php page with a query string of ‘?img=1′ attached. The page is executed and sends image data.

This method seems a bit complicated at first sight but it works well.

Uses:

1. We know that we can always link images to outside source, this method is not some hot-shot popular method. But its a possible workaround when you cannot upload images.

2. Very useful while creating your own php scripts and putting it for download over the web. You have just one file, not a folder.

3. Its possible to keep other data, like zip files, anything you want to put up, not just images, for download.

You can store the encoded data ( and the content-length ) in a mysql table too. This is sometimes used for large collection of images

(Source)

If you enjoyed this post, make sure you subscribe to my RSS feed!


Wink 2.0 to Launch Next Week

Posted by admin in Internet, Tips Trick... | 08.26.2006 - 3:47 am


Social search engine Wink will launch version 2.0 of its service early next week with changes designed to make make search more social than ever.
Wink is a search engine that indexes tagged content from Digg, Yahoo MyWeb, Furl, Slashdot, other social bookmarking services and it’s own users’ archives.
Users can create collections, or lists of items related to a given topic, a list of pages related to buying a video projector or a list of pages related to the band Weezer. Lists can be subscribed to by other users.

The current version of Wink just ranks sites by the number of Wink users who have tagged them. Wink 2.0 users will also be able to move search results up and down by vote, including results from Google.

There will be a FireFox toolbar available for Wink next week as well, so you can perform all the site’s functions from any page.

(Source)

Technorati Tags: , ,

If you enjoyed this post, make sure you subscribe to my RSS feed!


Surprise Your Website Visitors

Posted by admin in Internet, Tips Trick... | 08.25.2006 - 9:45 pm


You can surprise you website visitors by telling them their location, their IP address and even the name of their internet service provider. This is possible by using a free service provided by IP2phrase.

IP2Phrase™ allows you to insert dynamic customizable welcome messages to your web page with geographical information.You can either design your own phrase or use one of their defaults.

Adding IP2phrase in your website is very simple. You just have to insert javascript snippet in your webpage.

Technorati Tags: , ,

If you enjoyed this post, make sure you subscribe to my RSS feed!


XAMPP (Apache+PHP+MYSQL+Perl)

Posted by admin in Internet, Tips Trick... | 08.24.2006 - 10:01 pm

Many people know from their own experience that it’s not easy to install an Apache web server and its gets even harder when you want to add MYSQL, PHP and Perl. :( So XAMPP is the way to go, XAMPP is an easy to install Apache, MySQL, PHP and Perl package developed by Apache Friends

XAMPP is free to use and is available for Windows, Linux and Beta versions available for Mac OS X and Solaris. :D
I use XAMPP Lite. It is a very reduced version of XAMPP. XAMPP Lite is an only “Take-Run-Delete-Forget-it” package.

Technorati Tags: , , ,

If you enjoyed this post, make sure you subscribe to my RSS feed!


Next Page »

Close
E-mail It