none

quick fix | No Comments | February 12th, 2009

A regex that will check for any characters that are not in the list below and return true if any unknown characters are found
a-z
A-Z
0-9
_ (under-dash)
- (hypen)
(space)
$text = preg_replace(‘/[^a-zA-Z0-9_ -]/s’, ”, $text);

....Read More
none
none

Mode rewrite, quick fix | No Comments | February 9th, 2009

redirect code for .htaccess

want to redirect
http://www.mydomain.com/index.htm     to http://www.mydomain.com
add this code in htaccess file  ::
RewriteRule ^index.htm$ http://www.mydomain.com/ [R=301,L]

....Read More
none
none

quick fix | No Comments | January 24th, 2009

Place www using htaccess

RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]

....Read More
none
none

quick fix | No Comments | January 24th, 2009

Remove WWW using htaccess

place this code in .htaccess file ::
RewriteCond %{HTTP_HOST} ^www.domainname.com$ [NC]
RewriteRule ^(.*)$ http://domainname.com/$1 [R=301,L]

....Read More
none
none

Facebook | 1 Comment | December 17th, 2020

== Description ==
Allow the use of Facebook Connect API for Wordpress authentication/registration of users and send comments to Facebook feed.
1. Access the blog (login) with your Facebook credentials where facebook validates the username without asking for the password necessary to access the blog/website.
2. The user does not need to register in the blog because thanks [...]

....Read More
none
none

quick fix | 2 Comments | November 20th, 2020

for that
increasing the server’s PHP memory_limi = 12 M
ini_set(”memory_limit”,”12M”);
The 12M sets the limit to 12 megabytes (12582912 bytes). If this doesn’t work, keep increasing the memory limit until your script fits or your server squeals for mercy.
You can also make this change permanently for all PHP scripts running on the server by adding [...]

....Read More
none
none

simple PHP code | No Comments | October 22nd, 2020

Dates and time in PHP

n this tutorial I’ll discuss dates and time in PHP, which is useful for a
myriad of tasks. To kick things off, take a look at PHP’s time()
function, which displays the current time measured in the number of seconds
since the Unix Epoch (January 1 1970 00:00:00 GMT):
print time();
?>
This is also called a UNIX timestamp, and as [...]

....Read More
none