PHP widely used for web development. More than 80% websites on internet are built using php. In this article i’ll tell you 10 most useful tips for php. Continue reading
PHP widely used for web development. More than 80% websites on internet are built using php. In this article i’ll tell you 10 most useful tips for php. Continue reading
It is a good idea to convert all urls into links in your web application like contact form, comment forms, chat application etc. To find and replace all urls with their links we will use php preg_replace
function. See below example
$text = "Hello Friends my website url is http://99webtools.com"; $text = preg_replace("~[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]~",'<a href="$0">$0</a>',$text); echo $text;
Output
Hello Friends my website url is http://99webtools.com
In previous article we learned how to prevent our blog content from copying by disabling right click on web page. Now in this article i will show you how to disable content selection on web page using jQuery.
To disable content selection on web page follow these steps Continue reading
Most webmasters want to protect their blog content from plagiarism. To protect blog content from copying we can do following to things.
as this is not 100% full proof way to protect your content from copying, Because these methods require JavaScript and user can disable JavaScript to copy the content. Continue reading
As website URL field is not mandatory in wordpress comment form but many times spammer use it to get backlinks to their website that results tons of garbage and spam comment. To get rid of spammer simply remove website field from comment form.
Continue readingWordPress has only two contact fields in users profile that is email and website. That may not be sufficient as there are many social networking sites (like Google+,facebook, twitter etc) are available to connect with users. We can add more contact methods in contact info section. To add more fields edit functions.php
file in your WordPress theme folder and add below code.
function new_contactmethods( $contactmethods ) { $contactmethods['twitter'] = 'Twitter'; // Add Twitter $contactmethods['facebook'] = 'Facebook'; // Add Facebook $contactmethods['google'] = 'Google+'; // Add Google+ return $contactmethods; } add_filter('user_contactmethods','new_contactmethods',10,1);
Above code will add Twitter, Facebook and Google+ fields in contact info section
Calculation of difference between 2 dates is not an easy task so I m writing a function which do this job easily. This function is useful for calculate age of person by DOB (date of birth) or calculating age of record in databse Continue reading
Are you a webmaster and want to index your website by Google in few hours? Then you are at right place.
Most of the new webmasters have one question: “Why does Google not find my website”. In most of the cases it is due to the fact that your website is not yet indexed by the Google. The Google bot will take some time to find this new website and then only it can index it. However, you don’t have to wait until Google finds it… You can tell Google about your new website if Google can’t find it. Continue reading
To send email from your php script either you can use PHP’s built-in mail function or third party library like phpmailer or swiftmailer.
In this article you will find both methods to send email. Continue reading
Pure php based domain availability checker script. This script can check domain availability without whois lookup. And supports all TLDs over internet
Each registered domain has its own ns (name server) entry. Which can be checked using dns_get_record() function. In this script we check whether queried domain has it ns entry or not if we found it then it is not available. Continue reading