<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://www.tchetch.net/wiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://www.tchetch.net/wiki/feed.php">
        <title>tchetch's wiki php</title>
        <description></description>
        <link>http://www.tchetch.net/wiki/</link>
        <image rdf:resource="http://www.tchetch.net/wiki/lib/images/favicon.ico" />
       <dc:date>2010-09-06T20:10:20+02:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://www.tchetch.net/wiki/php/bx_tmpfilename?rev=1265233386&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.tchetch.net/wiki/php/index?rev=1265233265&amp;do=diff"/>
                <rdf:li rdf:resource="http://www.tchetch.net/wiki/php/ldaptimetounixtime?rev=1252495374&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://www.tchetch.net/wiki/lib/images/favicon.ico">
        <title>tchetch's wiki</title>
        <link>http://www.tchetch.net/wiki/</link>
        <url>http://www.tchetch.net/wiki/lib/images/favicon.ico</url>
    </image>
    <item rdf:about="http://www.tchetch.net/wiki/php/bx_tmpfilename?rev=1265233386&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-02-03T22:43:06+02:00</dc:date>
        <title>php:bx_tmpfilename</title>
        <link>http://www.tchetch.net/wiki/php/bx_tmpfilename?rev=1265233386&amp;do=diff</link>
        <description>I use this code in my project bloxool to find a temporary filename.


function bx_tmpfilename() {
   if(!function_exists('sys_get_temp_dir')) {
      if(defined('BLOXOOL_TEMP_DIR')) {
         $temp = BLOXOOL_TEMP_DIR;
      } else {
         $temp = getenv('TMP');
         if($temp === FALSE || empty($temp)) {
            $temp = getenv('TEMP');
            if($temp === FALSE || empty($temp)) {
               $temp = getenv('TMPDIR');
               if($temp === FALSE || empty($temp)) {
       …</description>
    </item>
    <item rdf:about="http://www.tchetch.net/wiki/php/index?rev=1265233265&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-02-03T22:41:05+02:00</dc:date>
        <title>Various code in PHP</title>
        <link>http://www.tchetch.net/wiki/php/index?rev=1265233265&amp;do=diff</link>
        <description>*  Convert ldap timestamp to unix timestamp
	*  Get a temporary file</description>
    </item>
    <item rdf:about="http://www.tchetch.net/wiki/php/ldaptimetounixtime?rev=1252495374&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-09-09T13:22:54+02:00</dc:date>
        <title>LDAP Timestamp to Unix Timestamp</title>
        <link>http://www.tchetch.net/wiki/php/ldaptimetounixtime?rev=1252495374&amp;do=diff</link>
        <description>When requesting modifyTimestamp or createTimestamp from openLDAP, you get times in format like this one 20081016115136Z. The following code convert to unix timestamp :


/* Pretty straigtforward but it should be enough */
function ldapTimeToUnixTime($ldapTime) {
        $unixTime = 0;
        /* LDAP time is assumed to start with &quot;YYYYMMDDhhmmss&quot; and to be in a 
         * Greenwith Meantime format.
         */
        $pat = '/^([0-9]{4,4})([0-9]{2,2})([0-9]{2,2})([0-9]{2,2})([0-9]{2,2})' .
   …</description>
    </item>
</rdf:RDF>
