#Convert stdClass object to array in PHP The easiest way is to JSON-encode your object and then decode it back to an array: $array = …
Read MoreArticle
Check is checkbox checked in Jquery
## Check Checkbox Checked or Not $(‘input.addCheck’).prop(‘checked’,true); here, addCheck = checkbox class name prop(‘checked’,true) = will check is checkbox is checked. if checked return true;
Read MoreFacebook login in core php
<!–Add in Header / where login –> <button class=”facebook” id=”facebook”><i class=”fa fa-facebook” aria-hidden=”true”></i>Sign in with Facebook</button> <!– Add in Header / where login –> ## …
Read MoreGet Location details using IP address
<?php $my_location_ip =’95.212.128.0′; $url = “http://ipinfo.io/{$my_location_ip}/json“; //======== Using Curl //Function : Starts ======= ##Get a web file (HTML, XHTML, XML, image, etc.) from a URL. …
Read MoreFacebook share using third party
## Share page in social site. Just add the block where you want it will work as you want. It show all social Link <!– …
Read MoreShow YouTube vedio in php
## GET YOUTUBE VEDIO <?php function getYoutubeEmbedUrl($url) { $shortUrlRegex = ‘/youtu.be\/([a-zA-Z0-9_]+)\??/i’; $longUrlRegex = ‘/youtube.com\/((?:embed)|(?:watch))((?:\?v\=)|(?:\/))(\w+)/i’; if (preg_match($longUrlRegex, $url, $matches)) { $youtube_id = $matches[count($matches) – 1]; } if (preg_match($shortUrlRegex, …
Read MoreCrome browser showing page not working after post data in php
## FOR CROME SHOWING This page isn’t working PROBLEM:: This page isn’t working Chrome detected unusual code on this page and blocked it to protect …
Read MoreGet all contents and files in Directory in php
## GET CONTENTS IN A DIRECTORY $theme_contents_all = array(); $theme_contents_files = array(); // Open a directory, and read its contents if (is_dir(MINI_USER_THEME_DIR)){ //check if exists, …
Read MoreHow to show YouTube vedio using youtube link in php
## GET YOUTUBE VEDIO <?php function getYoutubeEmbedUrl($url) { $shortUrlRegex = ‘/youtu.be\/([a-zA-Z0-9_]+)\??/i’; $longUrlRegex = ‘/youtube.com\/((?:embed)|(?:watch))((?:\?v\=)|(?:\/))(\w+)/i’; if (preg_match($longUrlRegex, $url, $matches)) { $youtube_id = $matches[count($matches) – 1]; } if (preg_match($shortUrlRegex, …
Read MoreEmail with attachment
$file = $path.$filename; $content = file_get_contents( $file); $content = chunk_split(base64_encode($content)); $uid = md5(uniqid(time())); $name = basename($file); // header $header = “From: “.$from_name.” <“.$from_mail.”>\r\n”; $header .= …
Read More