<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>K&#039;s Lair &#187; php</title>
	<atom:link href="http://andreas.goelzer.de/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://andreas.goelzer.de</link>
	<description>Electronics and small programs and other stuff</description>
	<lastBuildDate>Thu, 02 Sep 2010 12:30:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>KFile, a simple download-link generator for WordPress</title>
		<link>http://andreas.goelzer.de/kfile-a-simple-download-link-generator-for-wordpress</link>
		<comments>http://andreas.goelzer.de/kfile-a-simple-download-link-generator-for-wordpress#comments</comments>
		<pubDate>Mon, 10 Mar 2008 20:09:16 +0000</pubDate>
		<dc:creator>Andreas Goelzer</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://andreas.goelzer.de/index.php/kfile-a-simple-download-link-generator-for-wordpress/.</guid>
		<description><![CDATA[After finally finding a nice CMS to use for my homepage, I was searching for a simple plugin that lets me upload files manually using scp or other means from the command line display a nice link to the file, &#8230; <a href="http://andreas.goelzer.de/kfile-a-simple-download-link-generator-for-wordpress">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After finally finding a nice CMS to use for my homepage, I was searching for a simple plugin that lets me</p>
<ul>
<li>upload files manually using scp or other means from the command line</li>
<li>display a nice link to the file, stating name, size etc. after adding a text like &#91;file=foo.tar.bz2&#93;</li>
</ul>
<p>All I found were quite large plugins using databases, using quite elaborate administration front ends. So I started writing one myself.</p>
<h3>Usage</h3>
<ul>
<li>Install and activate the plugin.</li>
<li>Create a directory wordpressurl/download (alternatively, change the constant in kfile.php)</li>
<li>Upload files there</li>
<li>Add tags like &#91;file=foo.tar.bz2&#93; to your posts whereever you want the links placed. you might also specify multiple files, as in &#91;file=foo.tar.bz2,bar.gif&#93;</li>
</ul>
<hr /><a href='http://andreas.goelzer.de/download/kfile.zip'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-archive.png" width="16" height="16" alt="filetype" class="icon16" /> kfile.zip</a> (105.98 kiB, 2008-06-02)<br/><hr />
]]></content:encoded>
			<wfw:commentRss>http://andreas.goelzer.de/kfile-a-simple-download-link-generator-for-wordpress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deleting multiple tables with a common prefix</title>
		<link>http://andreas.goelzer.de/deleting-multiple-tables-with-a-common-prefix</link>
		<comments>http://andreas.goelzer.de/deleting-multiple-tables-with-a-common-prefix#comments</comments>
		<pubDate>Tue, 04 Mar 2008 22:20:19 +0000</pubDate>
		<dc:creator>Andreas Goelzer</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://www.goelzer.de/andreas/wordpress/?p=8</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 &#60;?php //Connect to the database server and select our database $link = mysql_connect&#40;'rdbms.strato.de', 'UXXXX', 'epsilon eridani'&#41; or die&#40;'Could not connect: ' &#8230; <a href="http://andreas.goelzer.de/deleting-multiple-tables-with-a-common-prefix">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">//Connect to the database server and select our database</span>
<span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rdbms.strato.de'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UXXXX'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'epsilon eridani'</span><span style="color: #009900;">&#41;</span> 
	or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Could not connect: '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DBXXXX'</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Could not select database'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//get table list</span>
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SHOW TABLES&quot;</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//kill tables</span>
<span style="color: #000088;">$tokillprefix</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;jos_&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #339933;">=</span><span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
 	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tokillprefix</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$tokillprefix</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	 	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;killing <span style="color: #006699; font-weight: bold;">$row[0]</span> &lt;br&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DROP TABLE <span style="color: #006699; font-weight: bold;">$row[0]</span>&quot;</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span>done</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://andreas.goelzer.de/deleting-multiple-tables-with-a-common-prefix/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)

Served from: andreas.goelzer.de @ 2010-09-06 08:47:30 -->