<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[UAE Linux User Group - Programming & Scripting]]></title>
	<link rel="self" href="http://uaelug.org/feed/atom/forum/13/"/>
	<updated>2009-11-02T09:56:26Z</updated>
	<generator>PunBB</generator>
	<id>http://uaelug.org/</id>
		<entry>
			<title type="html"><![CDATA[PHP Content Management Systems]]></title>
			<link rel="alternate" href="http://uaelug.org/topic/62/php-content-management-systems/new/posts/"/>
			<summary type="html"><![CDATA[<p>Dear Members,</p><p>I&#039;ve been searching for using a PHP CMS as a main one, but I&#039;m a bit confused on which one to choose !<br />As you may know, there&#039;s many of them.</p><p>Please tell me your ideas about it ..</p><p>Cheers,<br />Ehsan</p>]]></summary>
			<author>
				<name><![CDATA[xaitax]]></name>
				<uri>http://uaelug.org/user/23/</uri>
			</author>
			<updated>2009-11-02T09:56:26Z</updated>
			<id>http://uaelug.org/topic/62/php-content-management-systems/new/posts/</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[PHP Compiling Error]]></title>
			<link rel="alternate" href="http://uaelug.org/topic/58/php-compiling-error/new/posts/"/>
			<summary type="html"><![CDATA[<p>Hello Everyone.</p><p>I have a PHP compiling error. Trying to follow this article. <a href="http://deekayen.net/drupal-snow-leopard">http://deekayen.net/drupal-snow-leopard</a><br />Trying to backgrade to PHP 5.3 to PHP 5.2.</p><p>Can anyone clarify what this line is.</p><p>Add -lresolv on EXTRA_LIBS in Makefile, or you&#039;ll get an error with dns.o right at the end of the compile.</p><p>Thanks, noussh.</p>]]></summary>
			<author>
				<name><![CDATA[AdmiralA]]></name>
				<uri>http://uaelug.org/user/20/</uri>
			</author>
			<updated>2009-09-09T21:11:39Z</updated>
			<id>http://uaelug.org/topic/58/php-compiling-error/new/posts/</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Learning Programing -- Partners needed]]></title>
			<link rel="alternate" href="http://uaelug.org/topic/8/learning-programing-partners-needed/new/posts/"/>
			<summary type="html"><![CDATA[<p>Ola guys &amp; girls (if any <img src="http://uaelug.org/img/smilies/tongue.png" width="15" height="15" alt="tongue" />),</p><p>I&#039;m about to start learning some programing languages and I&#039;m starting with Python.</p><p>I&#039;m looking for someone who is interested in learning who can join me. We can learn from each other and compete against each other <img src="http://uaelug.org/img/smilies/cool.png" width="15" height="15" alt="cool" /></p><p>Please post your details or PM me if you are interested.</p><p>Salut!<br />Zak</p><p>PS: I&#039;m open to learn ANYTHING else you wanna learn. Just give me a buzz and I&#039;m in <img src="http://uaelug.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></summary>
			<author>
				<name><![CDATA[Mohamed-1986]]></name>
				<uri>http://uaelug.org/user/10/</uri>
			</author>
			<updated>2009-09-01T19:58:06Z</updated>
			<id>http://uaelug.org/topic/8/learning-programing-partners-needed/new/posts/</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[[Shell-Scripting] Simple Webserver]]></title>
			<link rel="alternate" href="http://uaelug.org/topic/38/shellscripting-simple-webserver/new/posts/"/>
			<summary type="html"><![CDATA[<p>This has been showed in July Meetup by <a href="http://uaelug.org/user/9/">dan_r</a>. Also presentet in the forums <a href="http://uaelug.org/post/247/#p247">here</a>!</p><p>As requested, here are some snippets from last night:</p><p>A verbose command for downloading the top 3 videos from youtube:<br /></p><div class="codebox"><pre><code>wget http://www.youtube.com/ -O - 2&gt; /dev/null | grep &quot;&lt;a href&quot; | sed &#039;s/.*&lt;a href/&lt;a href/&#039; |cut -f2 -d&#039;&quot;&#039; | grep &quot;popular&quot; | cut -f1 -d&#039;&amp;&#039; | head -n 3 | sed &#039;s/^/http:\/\/youtube.com/&#039; | xargs -i clive {} \;</code></pre></div><p>For the web server, here are the contents of a config file that must be added to /etc/xinetd.d/&nbsp; <br />(The name of the file doesn&#039;t matter):</p><div class="codebox"><pre><code>service www
{
    port           = 80
    protocol       = tcp
    wait           = no
    user           = root
    server         = /home/dan/uaelug/httpd/httpd
}</code></pre></div><p>And here&#039;s the example web server in bash script (for educational use only).</p><div class="codebox"><pre><code>#! /bin/bash

docroot=&quot;/home/dan/uaelug/httpd&quot;

# First line holds the HTTP request
read request

# Keep swallowing lines until you get a blank one
# Note: HTTP lines are terminated with CR LF, and CR=&#039;\r&#039;
while read line; do
  test &quot;$line&quot; == $&#039;\r&#039; &amp;&amp; break
done

# Trim the request string and log it
url=${request#GET }
url=${url% HTTP/*}
echo $url &gt;&gt; /home/dan/uaelug/httpd/log.txt

# Serve the request if the file exists, otherwise 404
if [ -f &quot;${docroot}/${url}&quot; ]; then
echo -e &quot;HTTP/1.1 200 OK\r
Content-Type: text/html; charset=ISO-8859-1\r
\r&quot;
cat ${docroot}/${url}
echo -e &quot;\r&quot;

else
echo -e &quot;HTTP/1.1 404 Not Found\r
Content-Type: text/html; charset=UTF-8\r
\r&quot;
cat ${docroot}/404.html
echo -e &quot;\r&quot;

fi</code></pre></div><p>Reference: <a href="http://www.debian-administration.org/article/A_web_server_in_a_shell_script">http://www.debian-administration.org/ar &#133; ell_script</a></p><p>Again -&gt; Kudos to <a href="http://uaelug.org/user/9/">dan_r</a>.</p>]]></summary>
			<author>
				<name><![CDATA[AdmiralA]]></name>
				<uri>http://uaelug.org/user/3/</uri>
			</author>
			<updated>2009-07-15T22:58:17Z</updated>
			<id>http://uaelug.org/topic/38/shellscripting-simple-webserver/new/posts/</id>
		</entry>
</feed>
