Welcome to our first video tutorial. Where I’m going to show you in detail how to setup a local web development environment. This tutorial is for novices and beginner in web development. Most of us are using Windows systems, this is because I selected WAMP at the most appropriate tool for us. We will install WAMP at our computer, and I will show you how you can use your database (phpMyAdmin), and, as some extra – I will show you a process of making own php-based RSS feed (on PHP).
After you have finished this video, you can copy and test the code we have just made:
03 |
$vLink = mysql_connect( 'localhost' , 'root' , '' ); |
04 |
mysql_select_db( 'test_db' , $vLink ); |
05 |
mysql_query( 'SET names UTF8' ); |
06 |
$sSQL = 'SELECT * FROM `stories` ORDER BY `id` DESC' ; |
07 |
$vRes = mysql_query( $sSQL ); |
10 |
while ( $aRow = mysql_fetch_array( $vRes , MYSQL_ASSOC)) { |
13 |
mysql_free_result( $vRes ); |
19 |
foreach ( $aStories as $aStory ) { |
22 |
<guid><![CDATA[{ $aStory [ 'id' ]}]]></guid> |
23 |
<link><![CDATA[story.php?id={ $aStory [ 'id' ]}]]></link> |
24 |
<title><![CDATA[{ $aStory [ 'title' ]}]]></title> |
25 |
<description><![CDATA[{ $aStory [ 'description' ]}]]></description> |
26 |
<pubDate>{ $aStory [ 'when' ]}</pubDate> |
31 |
header( 'Content-Type: text/xml; charset=utf-8' ); |
33 |
<?xml version= "1.0" encoding= "UTF-8" ?> |
36 |
<title>Our own RSS feed</title> |
38 |
<description>Our own RSS feed</description> |
39 |
<lastBuildDate>2012-07-16 00:00:00</lastBuildDate> |