<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Code The World — Temp FIles]]></title>
		<link>https://codetheworld.com/viewtopic.php?id=60</link>
		<atom:link href="https://codetheworld.com/extern.php?action=feed&amp;tid=60&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Temp FIles.]]></description>
		<lastBuildDate>Mon, 16 Jun 2008 05:38:16 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Temp FIles]]></title>
			<link>https://codetheworld.com/viewtopic.php?pid=229#p229</link>
			<description><![CDATA[<p>hey not bad dude...i will definatly need to check this out</p>]]></description>
			<author><![CDATA[null@example.com (fecal)]]></author>
			<pubDate>Mon, 16 Jun 2008 05:38:16 +0000</pubDate>
			<guid>https://codetheworld.com/viewtopic.php?pid=229#p229</guid>
		</item>
		<item>
			<title><![CDATA[Temp FIles]]></title>
			<link>https://codetheworld.com/viewtopic.php?pid=149#p149</link>
			<description><![CDATA[<p>I wanted a way to delete my temp files that are old so i came up with</p><div class="codebox"><pre><code>// Define the folder to clean
// (keep trailing slashes)
$captchaFolder  = &#039;temp/&#039;;
 
// Filetypes to check (you can also use *.*)
$fileTypes      = &#039;*.jpg&#039;;
 
// Here you can define after how many
// minutes the files should get deleted
$expire_time    = 20; 
 
// Find all files of the given file type
foreach (glob($captchaFolder . $fileTypes) as $Filename) {
 
    // Read file creation time
    $FileCreationTime = filectime($Filename);
 
    // Calculate file age in seconds
    $FileAge = time() - $FileCreationTime; 
 
    // Is the file older than the given time span?
    if ($FileAge &gt; ($expire_time * 60)){
 
        // Now do something with the olders files...
 
        print &quot;The file $Filename is older than $expire_time minutes\n&quot;;
 
        // For example deleting files:
        //unlink($Filename);
    }
 
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Hornet)]]></author>
			<pubDate>Sun, 15 Jun 2008 14:24:17 +0000</pubDate>
			<guid>https://codetheworld.com/viewtopic.php?pid=149#p149</guid>
		</item>
	</channel>
</rss>
