Tech Sharing Blog

Web, Tech, Tips, Download Blog…

Advertisement

Archive for the ‘ Tips ’ Category

the following example use the javascript regular express to validate the value where Chinese charecter is not allow.


<script   language=javascript>   
    
  function   checkChinese(){   
    
      var   re   =   /[\u4E00-\u9FA0]+/;   
    
      if   (re.test(form1.tjiccode.value))   
    
      {   
    
          alert(”不允许输入中文!”);   
    
  return   false;   
    
      }   
    
  }   

Popularity: 1% [?]

By  default, window server 2003 only come with the 2 Remote client access, unless you bought the CAL license. (But not many of the company will buy). So only 2 active or disconnected session are allow in the sames time.


So when the 3th user would like to connect into the same server, he/she will get the error message of “The terminal server has exceeded the maximum number of allowed connection”


After googleing, found this solution:

  1. Go to Command Prompt
  2. Type mstsc /v:xxx.xxx.xxx.xxx /f -console (replace xxx.xxx.xxx.xxx with the remote IP)
  3. Login with the administrator account


This command will log you in with the 3th remote connection to your server, you should use this account to kick out the rest of the 2 account before you continue your job.


To delete the existing connection you may go to task Manager -> users -> select the user and log them off.


The alternative for this solution is you can configure the settings on terminal server to manage the connections in a variety of ways. You do that through Start > Control Panel > Administrative Tools > Terminal Services Configuration. Select the Connections folder from the left panel.


In the right panel you should see the available connection types. Most likely there will be an entry for RDP-Tcp (Microsoft RDP 5.2). Right-click on that entry and select Properties. Select the Sessions tab and you will see a number of options related to sessions. All of my drop downs were set to Never, which explained why they never timed-out. To solve our problem, you may check the ‘Override user settings‘ option and set ‘End a disconnected session’ and ‘Idle session limit’ to 15 minutes. I left the ‘Active session limit’ at Never since as long as you are actively using the connection.


Terminal Server has exceeded maximum number of allowed connection error message

Terminal Server has exceeded maximum number of allowed connection error message


Terminal services configuration window

Terminal services configuration window

Popularity: 2% [?]

Just working out on the phpBB3.0 on the user registration integration with the main web site. Because of I plan to write the main web site using the coldfusion + MS SQL, so the only way as I may thinking of to do the integration is write a web service a like page for my coldfusion application to call.


After read through some forum, blog, web site and finally find out the way for the integration and here to share my simple PHPBB 3.0 user registration integration code.


  < ?PHP
  define('IN_PHPBB', true);
  /* set scope for variables required later */
  global $phpbb_root_path;
  global $phpEx;
  global $db;
  global $config;
  global $user;
  global $auth;
  global $cache;
  global $template;

  # your php extension
  $phpEx = substr(strrchr(__FILE__, '.'), 1);
  $phpbb_root_path = "../";

/* includes all the libraries etc. required */
  require($phpbb_root_path ."common.php");
  require($phpbb_root_path ."includes/functions_user.php");
  $use-->session_begin();
  $auth->acl($user->data);

// username of the user being added
$username = 'david';

// the user’s password, which is hashed before inserting into the data base
$password = 'password';

// an email address for the user
$email_address = 'admin@david-cheong.com';

// since group IDs may change, you may want to use a query to make sure you are grabbing the
// right default group...
$group_name = ($coppa) ? 'REGISTERED_COPPA' : 'REGISTERED';
$sql = 'SELECT group_id
        FROM ' . GROUPS_TABLE . "
        WHERE group_name = '" . $db->sql_escape($group_name) . "'
            AND group_type = " . GROUP_SPECIAL;

$result = $db->sql_query($sql);

$row = $db->sql_fetchrow($result);

$group_id = $row['group_id'];

// timezone of the user... Based on GMT in the format of '-6', '-4', 3, 9 etc...
$timezone = '8';

$language = 'zh_cmn_hans';

// here if the user is inactive and needs to activate thier account through an activation link
// sent in an email we need to set the activation key for the user... (the goal is to get it about
// 10 chars of randomization) you can use any randomization method you want, for this example,
// I’ll use the following...
$user_actkey = md5(rand(0, 100) . time());
$user_actkey = substr($user_actkey, 0, rand(8, 12));

// IP address of the user stored in the Data base.
$user_ip = $user->ip;

// registration time of the user, timestamp format.
$registration_time = time();

// time since the user is inactive. timestamp.
$user_inactive_time = time();

$user_row = array(
    'username'              => $username,
    'user_password'         => phpbb_hash($password),
    'user_email'            => $email_address,
    'group_id'              => (int) $group_id,
    'user_timezone'         => (float) $timezone,
    'user_dst'              => $is_dst,
    'user_lang'             => $language,
    'user_type'             => '0',
    'user_actkey'           => $user_actkey,
    'user_ip'               => $user_ip,
    'user_regdate'          => $registration_time,
	'user_dateformat'   	=> 'D M d, Y g:i a'
);

$user_id = user_add($user_row);

echo 'userid' . $user_id;

?>

Click here for PHP Cross Reference of Architecture PHPBB3

Popularity: 11% [?]

Recover your mail client password

By David on October 18, 2009

Mail Passview is a small password recovery tool that help you to recover your passwords and other account detail for the email clients such as

  • Outlook Express
  • Microsoft Outlook 2000 (POP3 and SMTP Accounts only)
  • Microsoft Outlook 2002/2003/2007 (POP3, IMAP, HTTP and SMTP Accounts)
  • Windows Mail
  • Windows Live Mail
  • IncrediMail
  • Eudora
  • Netscape 6.x/7.x (If the password is not encrypted with master password)
  • Mozilla Thunderbird (If the password is not encrypted with master password)
  • Group Mail Free
  • Yahoo! Mail – If the password is saved in Yahoo! Messenger application.
  • Hotmail/MSN mail – If the password is saved in MSN/Windows/Live Messenger application.
  • Gmail – If the password is saved by Gmail Notifier application, Google Desktop, or by Google Talk.


For each account, Mail Password will display the

  • Acccount Name
  • Application
  • Email
  • Server
  • Server Type (POP3/IMAP/SMTP)
  • User name
  • Password


Again, please bear in mind that if this application is misuse by some body else, this can be the tools to hack your email.


Mail PassView (21)

mailpv Recover your mail client password

Popularity: 10% [?]

Proxy server is a server that sites between a client application, such as a web browser and a real server. It intercepts all requests to the real server to see if it can fulfill the requirests it self. If not, it forwards request to the real server.

There main purposes for using the proxy server are:

  • to keep machines behind it anonymous (mainly for security)
  • to speed up access to a resource (via caching). It is commonly used to cache web page from a web server
  • to censor network services or content
  • to forge transmitted content before delivery, eg: to insert advertisements


There are diff types of proxy server in generals:

  • Transparent Proxy: it identifies itself as a proxy server and also make the original IP address available through the http headers. The generally use to cache websites but do not effectively provide any anonymity to those who use them.
  • Anonymous Proxy: it identifies it self as a proxy server, but does not make the original IP address available. of proxy server is detectable, but provides reasonable anonymity for most users.
  • Distorting Proxy: This type of proxy server identifies itself as a proxy server, but make an incorrect original IP address available through the http headers.
  • High Anonymity Proxy: This type of proxy server does not identify itself as a proxy server and does not make available the original IP address.


You may easily get the free proxy server list from the Internet by Google it with the key word of “Free Proxy server list”. Or you may just access the following web site for the free Proxy server list:


Please bear in mind that when you use the free public proxy server, your transmitted data through the Proxy server may capture or monitor by some body including your login detail and password.

Step to set up the Proxy on difference browser:

Mozilla Firefox:

Tools -> Options -> Advanced -> Network -> Settings -> Manual proxy configuration -> enter the Proxy server IP and Port number

setting proxy for firefox Proxy Server and browser configuration


Google Chrome:
Options -> Under the Hood -> Change proxy settings -> Connections -> LAN Settings -> Proxy Server -> check the “use a proxy….” -> enter the proxy server IP and port number

* Google Chrome is share the same Proxy server setting with Internet Explorer

google chrome set proxy step 1 Proxy Server and browser configuration

google chrome set proxy step 2 Proxy Server and browser configuration

Internet Explorer:
Tools -> Internet Option -> Connections -> LAN Settings -> Proxy Server -> check the “use a proxy….” -> enter the proxy server IP and port number

google chrome set proxy step 2 Proxy Server and browser configuration

Opera:
Tools -> Preferences -> Network -> Proxy Server… -> Select what ever Protocol to use the Proxy Server -> enter the proxy server IP and port number

opera set proxy Proxy Server and browser configuration

Popularity: 1% [?]

Check the page’s last update date

  1. Go to any web site as you like
  2. Delete the content in the URL address bar
  3. Enter the following script javascript:alert(document.lastModified)
  4. Press Enter
  5. This code will display any web page’s last update including the specific time, so by using the this script, you will know that the content you get is that the latest or not
Tech share latest update is 11 Oct 2009 16:36:23

Tech share latest update is 11 Oct 2009 16:36:23

Popularity: 2% [?]

SEO Powered by Platinum SEO from Techblissonline