Archive for February, 2012

google translate selected language   A very common problem is to add google translator with already selected language which can be fix by the following code. function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: ‘en’, includedLanguages: ‘ja’, defaultLanguage: ‘ja’, multilanguagePage: true }, ‘google_translate_element’); }

set google translater default language We can set google translate default language by working with cookies for this first use google translate to translate your web page then see what cookies he has created (for this right click on your web page then page info then security then view cookies and click on googtrans you […]

call a function regularly call a function after a particular time period function getdata(){ var langu = jQuery(“.goog-te-combo”).html(‘<option value=””>Select Lanugage</option><option value=”en”>English</option><option value=”ja”>Japanese</option>’); jQuery(“.goog-te-gadget”).css({“margin-top”:”0px”}); intervaltime(); } </script> <script> function intervaltime(){ window.setInterval(function(){ getdata(); }, 5000); } $(function() { setTimeout(getdata, 3000); }); </script>

drupal 6 basic form <?php function test_myform($form_state) { // Access log settings: $options = array(‘1’ => t(‘Enabled’), ‘0’ => t(‘Disabled’)); $form[‘access’] = array( ‘#type’ => ‘fieldset’, ‘#title’ => t(‘Access log settings’), ‘#tree’ => TRUE, ); $form[‘access’][‘log’] = array( ‘#type’ => ‘radios’, ‘#title’ => t(‘Log’), ‘#default_value’ => variable_get(‘log’, 0), ‘#options’ => $options, ‘#description’ => t(‘The log.’), […]

finding mac address finding mac address <?php /* * Getting MAC Address using PHP *Kapil sharma */ ob_start(); // Turn on output buffering system(‘ipconfig /all’); //Execute external program to display output $mycom=ob_get_contents(); // Capture the output into a variable ob_clean(); // Clean (erase) the output buffer $findme = “Physical”; $pmac = strpos($mycom, $findme); // Find […]

online streaming in php,cctv in php

Posted: 8th February 2012 by urfusion in php, Uncategorized
Tags: , , , ,

online streaming in php,cctv in php online streaming,cctv in php WOWZA is a server that is use for live steaming

validation of number in javascript function check_number() { var number=document.getElementById(“mobileno”).value; if(isNaN(number)) { alert(“number only”); return false; } else { return true; } }

increasing date or how to get next date to current date or date in loop for applying date in a loop you have to increasing date according to your condition. so there is a way $date = date (“Y-m-d”, strtotime (“+1 day”, strtotime($date)));

stop web pages from refreshing or disable menu bar and status bar and tool bar in browser and disable right click hello frnds basically refreshing is depend on browser so one cant say that, that code stop browsers from refreshinghere is the code /////////////////////first file <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> […]

check database for array of values

Posted: 8th February 2012 by urfusion in php, Uncategorized
Tags: ,

check database for array of values example:UPDATE tableName SET someColumn = “updated” WHERE id IN(1, 88, 99, 152) so it can be done by for($i = 0; $i < count($arrayOfIDs) $i++) { if($i == 0) $concatenatedIDs .= $arrayOfIDs[$i]; else $concatenatedIDs .= ‘,’ . $arrayOfIDs[$i]; } $query = ‘UPDATE tableName SET someColumn = “updated” WHERE id […]