<?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>Webjournal</title>
	<atom:link href="http://www.webjournal.it/feed" rel="self" type="application/rss+xml" />
	<link>http://www.webjournal.it</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sun, 15 Jan 2012 18:04:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Function list, how to</title>
		<link>http://www.webjournal.it/74</link>
		<comments>http://www.webjournal.it/74#comments</comments>
		<pubDate>Thu, 22 Dec 2011 03:45:40 +0000</pubDate>
		<dc:creator>dragod</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.webjournal.it/?p=74</guid>
		<description><![CDATA[In this script we are going to know which function sets are supported on your installation. Source code:]]></description>
			<content:encoded><![CDATA[<div id = "custom_tooltip_contentbutton4" class = "tooltip_load">
<ul class="fancy_list" style="margin-bottom: 0px;">
	<li class="star_list silver_sprite">File: 1</li>
	<li class="check_list silver_sprite">Size: 2kb</li>
	<li class="arrow_list silver_sprite">Author: Administrator</li>
	<li class="circle_arrow silver_sprite">Licence: free</li>
</ul>
</div><script type="text/javascript">
			/* <![CDATA[ */
			jQuery(document).ready(function() {
				jQuery('#spanbutton4 > *').attr('id', 'button4');
				jQuery('#spanbutton4 > *').attr('rel', '#custom_tooltip_contentbutton4');
				jQuery('#button4').cluetip({ attribute: 'rel', local:true, width: 300, positionBy: 'customBottom', arrows: true, hideLocal: false, cursor: 'pointer', showTitle: false, waitImage: false, clickThrough: false, dropShadow: false, waitImage :false, onShow: function(e) { jQuery('#cluetip-arrows').removeClass().addClass('cluetip-arrows');jQuery('#cluetip').css('background-color','').css('border-color','');jQuery('#cluetip-arrows').css('border-color','');  }, fx: { open: 'fadeIn', openSpeed: 'fast' } });
			});
			
			/* ]]> */
			</script><p>In this script we are going to know which function sets are supported on your installation.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

echo 'Function sets supported in this install are:&lt;br /&gt;';

$extensions = get_loaded_extensions();
 foreach ($extensions as $each_ext)

{

echo &quot;$each_ext &lt;br /&gt;&quot;;
 echo '&lt;ul&gt;';
 $ext_func = get_extension_funcs($each_ext);
 foreach ($ext_func as $func)

{

echo &quot;&lt;li&gt;$func &lt;/li&gt;&quot;;

}

echo '&lt;/ul&gt;';

}

?&gt;</pre>
<p>Source code:<br />
<span id = "spanbutton4"><a class="button_link small_button" href="#"><span>Download</span></a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webjournal.it/74/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail Class</title>
		<link>http://www.webjournal.it/27</link>
		<comments>http://www.webjournal.it/27#comments</comments>
		<pubDate>Tue, 20 Dec 2011 23:39:35 +0000</pubDate>
		<dc:creator>dragod</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.webjournal.it/?p=27</guid>
		<description><![CDATA[In this article i build a simple class to send e-mail: &#160; class Mail{ public $to = NULL; public $from = NULL; public $subject = NULL; public $body = NULL; public $headers = NULL; public function My_mail($to, $from, $subject, $body){ $this-&#62;to = trim($to); $this-&#62;from = trim($from); $this-&#62;subject = trim($subject); $this-&#62;body = trim($body); } public function send_mail(){ $this-&#62;addHeader(&#8216;From: &#8216;.$this-&#62;from.&#8221;\r\n&#8221;); $this-&#62;addHeader(&#8216;Content-type: text/html; ...]]></description>
			<content:encoded><![CDATA[<p>In this article i build a simple class to send e-mail:</p>
<p>&nbsp;</p>
<p>class Mail{</p>
<p>public $to = NULL;<br />
public $from = NULL;<br />
public $subject = NULL;<br />
public $body = NULL;<br />
public $headers = NULL;</p>
<p>public function My_mail($to, $from, $subject, $body){</p>
<p>$this-&gt;to = trim($to);<br />
$this-&gt;from = trim($from);<br />
$this-&gt;subject = trim($subject);<br />
$this-&gt;body = trim($body);</p>
<p>}</p>
<p>public function send_mail(){</p>
<p>$this-&gt;addHeader(&#8216;From: &#8216;.$this-&gt;from.&#8221;\r\n&#8221;);<br />
$this-&gt;addHeader(&#8216;Content-type: text/html; charset=iso-8859-1&#8242; . &#8220;\r\n&#8221;);<br />
$this-&gt;addHeader(&#8216;MIME-Version: 1.0&#8242; . &#8220;\r\n&#8221;);<br />
$this-&gt;addHeader(&#8216;Reply-To: &#8216;.$this-&gt;from.&#8221;\r\n&#8221;);<br />
$this-&gt;addHeader(&#8216;Return-Path: &#8216;.$this-&gt;from.&#8221;\r\n&#8221;);<br />
$this-&gt;addHeader(&#8216;X-mailer: mail 1.0&#8242;.&#8221;\r\n&#8221;);<br />
mail($this-&gt;to,$this-&gt;subject,$this-&gt;body,$this-&gt;headers);</p>
<p>}</p>
<p>public function addHeader($header){</p>
<p>$this-&gt;headers .= $header;</p>
<p>}</p>
<p>}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webjournal.it/27/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple DB class</title>
		<link>http://www.webjournal.it/7</link>
		<comments>http://www.webjournal.it/7#comments</comments>
		<pubDate>Tue, 22 Nov 2011 17:44:28 +0000</pubDate>
		<dc:creator>dragod</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.webjournal.it/?p=7</guid>
		<description><![CDATA[Create a Database class who connect to Database is really simple. Here a snippet of code to create a connection, using the __construct method &#60;?php //Creating the class class Dbconn { public $server;      // server Example: localhost private $dbuser;     // database user name private $dbpsw;    // database user password private $dbname;    //database name protected ...]]></description>
			<content:encoded><![CDATA[<p>Create a Database class who connect to Database is really simple. Here a snippet of<br />
code to create a connection, using the __construct method</p>
<p>&lt;?php</p>
<p>//Creating the class</p>
<p>class Dbconn {</p>
<p>public $server;      // server Example: localhost<br />
private $dbuser;     // database user name<br />
private $dbpsw;    // database user password<br />
private $dbname;    //database name<br />
protected $link;<br />
protected $query;<br />
protected $result;<br />
protected $num_results;<br />
protected $row;</p>
<p>// Declaring final this method, is useful here, because you cant override that in the future</p>
<p>final public function __construct($server, $dbuser, $dbpsw, $dbname){</p>
<p>$this-&gt;server = $server;<br />
$this-&gt;dbuser = $dbuser;<br />
$this-&gt;dbpsw = $dbpsw;<br />
$this-&gt;dbname = $dbname;<br />
$this-&gt;connect();</p>
<p>}</p>
<p>private function connect(){</p>
<p>$this-&gt;link = new mysqli($this-&gt;server, $this-&gt;dbuser, $this-&gt;dbpsw, $this-&gt;dbname);  //Make the connection</p>
<p>mysqli_select_db($this-&gt;link, $this-&gt;dbname);   // Select the database</p>
<p>//If the connection to database fail, return a error</p>
<p>if(! $this-&gt;link)die(&#8220;Error: Could not connect to database&#8221;).mysqli_errno();</p>
<p>else echo &#8221; Connected &lt;br /&gt;&#8221;;</p>
<p>}</p>
<p>// Here an example to compose your query, you can change the code below at your own</p>
<p>public function query($query){</p>
<p>$this-&gt;query = $query;</p>
<p>$this-&gt;result = $this-&gt;link-&gt;query($query);</p>
<p>$this-&gt;num_results = $this-&gt;result-&gt;num_rows;</p>
<p>echo (&#8220;Row in database: $this-&gt;num_results&lt;br /&gt;&#8221;);</p>
<p>}</p>
<p>public function __sleep(){</p>
<p>echo &#8216;Going to sleep&#8230;&lt;br /&gt;&#8217;;<br />
return array(&#8216;server&#8217;, &#8216;dbuser&#8217;, &#8216;dbpsw&#8217;, &#8216;dbname&#8217;);</p>
<p>}</p>
<p>public function __wakeup(){</p>
<p>echo &#8220;Waking up&#8230;.&lt;br /&gt;&#8221;;<br />
$this-&gt;connect();</p>
<p>}</p>
<p>}</p>
<p>$dbconn = new DbConn(&#8216;server&#8217;, &#8216;dbuser&#8217;, &#8216;dbpassword&#8217;, &#8216;dbname&#8217;);  // Insert your database parameter<br />
$dbconn-&gt;query(&#8216;select * from authorized_users&#8217;);<br />
$dbconn-&gt;query(&#8216;select * from customers&#8217;);<br />
$serialize= serialize($dbconn);<br />
$unserialize = unserialize($serialize);</p>
<p>?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webjournal.it/7/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

