• We are available for any Development work:
  • Email us at: programmer_heart@yahoo.com

How to show Success Message as popups in Gravity Form in wordpress

To do this open your functions.php file and paste the following code:

  You can change the pop up  message style  by modifying what is inside the sw_gf_thx_msg() function.

Continue reading

How to show Validation error as popups in Gravity Form in wordpress

To do this open your functions.php file and paste the following code:

  You can change the error message by modifying what is inside the alert () function.

Continue reading

Remove Directory which is not empty

Here is the function for delete the directory which have contents. you can try this. [code] function deleteDirectory($dir) { if (!file_exists($dir)) return true; if (!is_dir($dir)) return unlink($dir); foreach (scandir($dir) as $item) { if ($item == ‘.’ || $item == ‘..’) continue; if (!deleteDirectory($dir.DIRECTORY_SEPARATOR.$item)) return false; } return rmdir($dir); } [/code]

Continue reading

Remove the paragraph tags from iFrames and images in wordpress

TO remove the tags that appear wrapped around Images and iframes, you need to add this to your functions.php [php] <?php //filter the <p> tags from the images and iFrame function filter_ptags_on_images($content){ $content = preg_replace(‘/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU’, ‘\1\2\3’, $content); return preg_replace(‘/<p>\s*(<iframe .*>*.<\/iframe>)\s*<\/p>/iU’, ‘\1’, $content); } add_filter(‘the_content’, ‘filter_ptags_on_images’);?> [/php]

Continue reading

Getting Mac Address from PHP

here is the code for grab the mac address ..

Continue reading

E-mail Sending from localhost in Windows Environment in PHP

1) Open the “php.ini“. You should know where it is located because it depends upon the particular server you’re running.
2) Search for the attribute called “SMTP” in the php.ini file.Generally you can find the line “SMTP=localhost“. change the localhost to the smtp server name of your ISP. And, there is another attribute called “smtp_port” which should be set to 25.I’ve set the following values in my php.ini file.
SMTP = smtp.domain.com
smtp_port = 25

Continue reading
Press Enter to Search