How to parse a XML file using PHP
Here is an example on how to get data from XML files using PHP. XML file example: <?xml version="1.0" encoding="utf-8"?> <Data> <Logo>Logo Test</Logo> <Title>Title...
View ArticleSend an email with PHP (HTML content supported)
Here is a php function with which you can send an email with normal text or in html format. PHP code: $email_to = "Where the email will be sended to."; $email_from = "From where the email will be...
View ArticlePHP Email Validation
Below PHP function returns true if the email address given as parameter is valid, false otherwise. PHP code: function validEmail($email){ if...
View ArticleList all files from a folder with PHP
This function will list all the files from a folder. Give the folder as a parameter. PHP code: listFolder("folder/"); function listFolder($folder){ $folderData = opendir($folder); while (($file...
View ArticleFront End AJAX in WordPress
Copy the below code in a file (frontend-ajax.php) and call it as an AJAX url. PHP code: define("DOING_AJAX", true); require_once("../../../wp-load.php"); // Add wp-load.php file....
View Article