<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-391303843766438640</id><updated>2024-10-24T22:23:52.430+02:00</updated><category term="address"/><category term="avstore"/><category term="close"/><category term="count"/><category term="digital signage"/><category term="ip"/><category term="javascript"/><category term="mysql"/><category term="php"/><category term="popup"/><category term="sql"/><category term="visual communication"/><category term="window"/><title type='text'>Tricks 4 Developer</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tricks4dev.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/391303843766438640/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://tricks4dev.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Gabriele Formenti</name><uri>http://www.blogger.com/profile/10173201669189652162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='22' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFt_bKr0EFxQvqsbzHxc6LiL__cZ_pZABBtCBQy8uHznMkbrLVlUbeX7xs4ezPlohSclWXbdl_JcKbsdhqEIEoLvzjGlcqsT617NhwUWj9yuze_iw9LvC_nZfv5fvHFg/s220/gabriele-moto-esp.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-391303843766438640.post-5608496179407185396</id><published>2010-01-28T21:44:00.003+01:00</published><updated>2010-01-28T21:49:30.450+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="address"/><category scheme="http://www.blogger.com/atom/ns#" term="ip"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Retrieve the ip address with php</title><content type='html'>Sometimes is usefull to know the ip address of our website users, to do this we can use php. &lt;br /&gt;
To retrieve the ip address using php is necessary the specific environment variable.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
The $_SERVER variable.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php;&quot;&gt;//this is the variable
$_SERVER[&#39;REMOTE_ADDR&#39;]&amp;nbsp;
&lt;/pre&gt;&lt;br /&gt;
Inside this special variable there is the ip address of the user that open the page.&lt;br /&gt;
&lt;br /&gt;
For example if we want print this variable this is the correct syntax:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: php;&quot;&gt;//this print my ip address
echo $_SERVER[&#39;REMOTE_ADDR&#39;];
&lt;/pre&gt;&lt;br /&gt;
Easy!!</content><link rel='replies' type='application/atom+xml' href='http://tricks4dev.blogspot.com/feeds/5608496179407185396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tricks4dev.blogspot.com/2010/01/retrieve-ip-address-with-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/391303843766438640/posts/default/5608496179407185396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/391303843766438640/posts/default/5608496179407185396'/><link rel='alternate' type='text/html' href='http://tricks4dev.blogspot.com/2010/01/retrieve-ip-address-with-php.html' title='Retrieve the ip address with php'/><author><name>Gabriele Formenti</name><uri>http://www.blogger.com/profile/10173201669189652162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='22' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFt_bKr0EFxQvqsbzHxc6LiL__cZ_pZABBtCBQy8uHznMkbrLVlUbeX7xs4ezPlohSclWXbdl_JcKbsdhqEIEoLvzjGlcqsT617NhwUWj9yuze_iw9LvC_nZfv5fvHFg/s220/gabriele-moto-esp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-391303843766438640.post-9062032835027169303</id><published>2010-01-25T22:40:00.002+01:00</published><updated>2010-01-25T22:53:42.869+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="count"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="sql"/><title type='text'>Count the number of rows in a MySQL query, the COUNT function</title><content type='html'>Many times it&#39;snecessary to count the result lines of a query. There are two ways to do this, php (mysql_num_rows) and MySQL with the &lt;i&gt;COUNT&lt;/i&gt;. In this post I show the MySQL &lt;i&gt;COUNT&lt;/i&gt; function.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This is a normal SELECT queries:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:sql;&quot;&gt;SELECT * FROM table WHERE field=&#39;value&#39;&lt;/pre&gt;&lt;br /&gt;
The result of this query is compose by all rows that respect the WHERE clause (field=&#39;value&#39;). But if I want to retrieve &lt;b&gt;only the number of rows&lt;/b&gt; but not its value I can use the mydql count function. At the follow a example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:sql;&quot;&gt;SELECT COUNT(*) FROM table WHERE&amp;nbsp; field=&#39;value&#39;&lt;/pre&gt;&lt;br /&gt;
Now the result is the number of rows that respect the WHERE clause. This function can also be applied on a table field in this way:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:sql;&quot;&gt;SELECT COUNT(field) FROM table WHERE&amp;nbsp; field=&#39;value&#39;&lt;/pre&gt;&lt;br /&gt;
In this way &lt;b&gt;the query is faster&lt;/b&gt; the the other with the all value (*).</content><link rel='replies' type='application/atom+xml' href='http://tricks4dev.blogspot.com/feeds/9062032835027169303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tricks4dev.blogspot.com/2010/01/count-number-of-rows-in-mysql-query.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/391303843766438640/posts/default/9062032835027169303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/391303843766438640/posts/default/9062032835027169303'/><link rel='alternate' type='text/html' href='http://tricks4dev.blogspot.com/2010/01/count-number-of-rows-in-mysql-query.html' title='Count the number of rows in a MySQL query, the COUNT function'/><author><name>Gabriele Formenti</name><uri>http://www.blogger.com/profile/10173201669189652162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='22' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFt_bKr0EFxQvqsbzHxc6LiL__cZ_pZABBtCBQy8uHznMkbrLVlUbeX7xs4ezPlohSclWXbdl_JcKbsdhqEIEoLvzjGlcqsT617NhwUWj9yuze_iw9LvC_nZfv5fvHFg/s220/gabriele-moto-esp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-391303843766438640.post-304373602722280089</id><published>2010-01-23T18:48:00.013+01:00</published><updated>2010-01-23T19:04:48.859+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="close"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="popup"/><category scheme="http://www.blogger.com/atom/ns#" term="window"/><title type='text'>Close a window in one click</title><content type='html'>With Javascript it&#39;s possible close a window in one click, to do this is necessary a link or a button and only one line of code!&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
The &lt;i&gt;close&lt;/i&gt; function do the right thing:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: js;&quot;&gt;window.close();&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Now two examples that shows how use the &lt;i&gt;close&lt;/i&gt; function. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: html js;&quot;&gt;&amp;lt;!--On a link--&amp;gt;
&amp;lt;a href=&quot;#&quot; onclick=&quot;window.close();return false;&quot;&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: html js;&quot;&gt;&amp;lt;!--On a button--&amp;gt; 
&amp;lt;input type=&quot;button&quot; name=&quot;Bottone&quot; value=&quot;Chiudi&quot; Onclick=&quot;window.close();&quot;&amp;gt;&lt;/pre&gt;&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=391303843766438640&amp;amp;postID=304373602722280089#&quot; onclick=&quot;finestra=window.open(&#39;http://tricks4dev.blogspot.com&#39;, &#39;mywindow&#39;,&#39;status=1,width=400,height=200&#39;);return false;&quot;&gt;Click this link to &lt;b&gt;open&lt;/b&gt; a popup window&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=391303843766438640&amp;amp;postID=304373602722280089#&quot; onclick=&quot;finestra.close();return false;&quot;&gt;Click this link to &lt;b&gt;close&lt;/b&gt; the popup&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;input name=&quot;Bottone&quot; onclick=&quot;finestra.close();return false;&quot; type=&quot;button&quot; value=&quot;Push this button to close the popup&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://tricks4dev.blogspot.com/feeds/304373602722280089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tricks4dev.blogspot.com/2010/01/close-window-in-one-click.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/391303843766438640/posts/default/304373602722280089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/391303843766438640/posts/default/304373602722280089'/><link rel='alternate' type='text/html' href='http://tricks4dev.blogspot.com/2010/01/close-window-in-one-click.html' title='Close a window in one click'/><author><name>Gabriele Formenti</name><uri>http://www.blogger.com/profile/10173201669189652162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='22' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFt_bKr0EFxQvqsbzHxc6LiL__cZ_pZABBtCBQy8uHznMkbrLVlUbeX7xs4ezPlohSclWXbdl_JcKbsdhqEIEoLvzjGlcqsT617NhwUWj9yuze_iw9LvC_nZfv5fvHFg/s220/gabriele-moto-esp.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-391303843766438640.post-3520656530207736958</id><published>2009-11-09T17:41:00.000+01:00</published><updated>2010-01-24T18:16:49.990+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="avstore"/><category scheme="http://www.blogger.com/atom/ns#" term="digital signage"/><category scheme="http://www.blogger.com/atom/ns#" term="visual communication"/><title type='text'>Digital Signage solutions and visual communication</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;http://www.tecnopillole.com/wp-content/uploads/2009/11/AVstore.gif&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.tecnopillole.com/wp-content/uploads/2009/11/AVstore.gif&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;AVstore in cooperation with its partners (SpinetiX, LG, Keesquare and 3M) will hold a technical training day on digital signage and visual communication.&lt;br /&gt;
&lt;br /&gt;
During the day will give the most innovative AVstore&#39;s products with live demonstrations and practical exercises&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.avstore.tv/soluzioni-per-il-digital-signage-e-la-videocomunicazione-2.0/agenda.asp?fonte=tricks4dev&quot;&gt;At the following link you can find all necessary information about the training day.&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://tricks4dev.blogspot.com/feeds/3520656530207736958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tricks4dev.blogspot.com/2009/09/digital-signage-solutions-and-visual.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/391303843766438640/posts/default/3520656530207736958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/391303843766438640/posts/default/3520656530207736958'/><link rel='alternate' type='text/html' href='http://tricks4dev.blogspot.com/2009/09/digital-signage-solutions-and-visual.html' title='Digital Signage solutions and visual communication'/><author><name>Gabriele Formenti</name><uri>http://www.blogger.com/profile/10173201669189652162</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='22' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFt_bKr0EFxQvqsbzHxc6LiL__cZ_pZABBtCBQy8uHznMkbrLVlUbeX7xs4ezPlohSclWXbdl_JcKbsdhqEIEoLvzjGlcqsT617NhwUWj9yuze_iw9LvC_nZfv5fvHFg/s220/gabriele-moto-esp.jpg'/></author><thr:total>0</thr:total></entry></feed>