/[cvs]/nfo/php/libs/org.netfrag.glib/utils/extensions.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.glib/utils/extensions.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Sat Apr 5 19:53:45 2003 UTC revision 1.2 by jonen, Sun Apr 6 01:37:31 2003 UTC
# Line 13  Line 13 
13   * $Id$   * $Id$
14   *   *
15   * $Log$   * $Log$
16     * Revision 1.2  2003/04/06 01:37:31  jonen
17     * + added functions to generate and handle unique ID's
18     *
19   * Revision 1.1  2003/04/05 19:53:45  joko   * Revision 1.1  2003/04/05 19:53:45  joko
20   * moved here from ../   * moved here from ../
21   *   *
# Line 637  Bitte versuchen Sie es später nocheinmal Line 640  Bitte versuchen Sie es später nocheinmal
640    
641    }    }
642    
643      //examples on howto create unique id's
644      // from: http://www.php.net/manual/en/function.uniqid.php
645      function CreateGUID(){
646        srand((double)microtime()*1000000);
647        $r = rand ;
648        $u = uniqid(getmypid() . $r . (double)microtime()*1000000,1);
649        $m = md5 ($u);
650        return($m);
651      }
652    
653      function CompressID( $ID ){
654        return(Base64_encode(pack("H*",$ID)));
655      }
656    
657      function ExpandID ($ID){
658        return ( implode(unpack("H*",Base64_decode($ID)), '') );
659      }
660    
661    
662  }  }
663    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed