Posts

common functions

public function get_user_meta($userID,$metakey){ $this->db->where(['user_id'=>$userID,'key'=>$metakey]); $query = $this->db->get('user_meta'); if($query->num_rows()>0){ $row = $query->row(); return is_serial($row->value) ? unserialize($row->value) : $row->value ; } } public function update_user_meta($userID,$metakey,$metavalue){ $this->db->where(['user_id'=>$userID,'key'=>$metakey]); $query = $this->db->get('user_meta'); $metavalue = is_array($metavalue) ? serialize($metavalue) : $metavalue; if($query->num_rows()>0){ $this->db->update('user_meta',['value'=>$metavalue], 'user_id'=>$userID,'key'=>$metakey]); $row = $query->row(); return $row->id; }else{ $this->db->insert('user_meta',['value'=>$metavalue,'user_id'=>$userID,'key'=...

skype multiple login

On the  Shortcut  tab, in the  Target  field add  /secondary  to the end of the path. The Target field should now read  "C:\Program Files\Skype\Phone\Skype.exe" /secondary  (or  "C:\Program Files (x86)\Skype\Phone\Skype.exe" /secondary  if you’re running a 64-bit operating system).

woocommerse product category

<div id="allcategories" style="display:none;"><div id="all_pro_cat" style="display:none;"><ul><?php wp_list_categories( 'show_count=0&hierarchical=1&taxonomy=product_cat&depth=2&title_li=' ); ?></ul></div></div>'; output : <ul> <li class="cat-item cat-item-112"><a href="https://OnlineStore/product-category/container-components/">Container Components</a> <span class="toggle"></span><ul class="children">  <li class="cat-item cat-item-183"><a href="https://OnlineStore/product-category/container-components/capseal-tools/">Capseal Tools</a> </li>  <li class="cat-item cat-item-185"><a href="https://OnlineStore/product-category/container-components/capseals/">Capseals</a> </li>  <li class="cat-item...

Links

For Temp email https://temp-mail.org/ ------------------------------------------------ Temp SMS https://play.google.com/store/apps/details?id=com.gogii.textplus&hl=en https://itunes.apple.com/us/app/textplus-unlimited-sms-texting-calling/id314487667?mt=8 ---------------------------------------------------------------------------------------------------------- Permanent Personal Computer https://www.rabb.it/ ------------------------------------------------------------------ Temp RDP (Remote Desktop) https://www.apponfly.com ------------------------------------------------------ 24 Hours RDP (Remote Desktop) https://vmware.nvidiagrid.net/ -------------------------------------------- Light Weight Text Editor Sublime Text (google the link) ---------------------------------------------- Change your IP using VPN http://www.freevpnnetwork.com/ ----------------------------------------------------- free proxy servers http://free-proxy-list.net/anonymo...

php unzip

$zip = new ZipArchive; $res = $zip->open('xyz.zip'); if ($res === TRUE) {   $zip->extractTo('/');   $zip->close();   echo 'done'; } else {   echo 'error'; }

php scrapping

function file_get_contents_curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);       $data = curl_exec($ch); curl_close($ch); return $data; } $htmldata = file_get_contents_curl('http://bascousa.com/kraft-self-seal-bubble-mailers-bmb857ss.html'); $error = false; if($htmldata){ $domdocument= new DOMDocument; $internalErrors = libxml_use_internal_errors(true); $domdocument->loadHTML($htmldata); libxml_clear_errors(); //remove errors for yucky html $readhtml_xpath = new DOMXPath($domdocument); $name = array(); $articlename       =   $readhtml_xpath->query('//div[contains(@id,"content_features")]/div'); if($articlename->length > 0 && !$error){ ...

php putcsv

$list = array ( "Peter,Griffin,Oslo,Norway", "Glenn,Quagmire,Oslo,Norway", ); $file = fopen("contacts.csv","w"); foreach ($list as $line)   {   fputcsv($file,explode(',',$line));   } fclose($file);