Home » Archive

Articles in the pHp Category

Bookmarks, Hosting, Linux, pHp »

[24 Apr 2010 | One Comment | 87 views]

If you want to transfer a lot of information, and server or hosting has some limitations, the best solution is here: PhP-ZiP MultiVolume Script.
Step 1:

1. Download This Script

Mirror 1 – phpzip-multivol.zip
Mirror 2 -  phpzip-multivol.zip
Local File – phpzip-multivol.zip

2. Upload script on old host/server
3. Load script “phpzip-multivol.php” in browser
4. Configure script with desired values
5. Starts script and waits until it reaches the final job (parsing data)

Step 2:

1. You just need to run shell scripts from the command line (in old server for archive) ex: ./backup-2010-04-24_zip.sh
2. Copy all archives on the new …

Bookmarks, Wordpress, pHp »

[20 Mar 2010 | No Comment | 74 views]

This plugin creates a short url for wordpress blog, but compared to other plugins, the link is created on the same domain with the blog, which means that in terms of SEO is better. Plugin does not specifically require any configuration, just activate and use. By default, links will be displayed in a particular field after content.
For use in custom mode _SELF_SHORT_URL_AUTO must be “false” and you can use function available for displaying links:
get_self_short_url – which returns a short link to the current URL (curent post in loop mode).
function …

Bookmarks, pHp »

[25 Feb 2010 | No Comment | 88 views]

Testing odd or even numbers with modulo or php bitwise operators:
1. The fastest function, using php binary AND operator (Bitwise)
<?php
function is_odd( $int ) {
return( $int & 1 );
}
?>
2. and the alternative using php modulo operator (Arithmetic)
<?php
function is_odd($number) {
return $number%2;
}
?>
** NOTE ** script using bitwise operations more efficiently than modulo !!!
[ Short URL ... ]

Bookmarks, pHp »

[20 Jan 2010 | 2 Comments | 447 views]

Operator
Description
Result

$a & $b
And
Bits that are set in both $a
and $b are set.

$a | $b
Or (inclusive or)
Bits that are set in either $a
or $b are set.

$a ^ $b
Xor (exclusive or)
Bits that are set in $a
or $b but not both are set.

$a << $b
Shift left
Shift the bits of $a
$b steps to the left (each step means
“multiply by two”)

$a >> $b
Shift right
Shift the bits of $a
$b steps to the right (each step means
“divide by two”)

~ $a
Not
Bits that are set in $a
are not set, and vice versa.

Bitwise operators allow evaluation and manipulation of specific …