<?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>Piotr Zaniewicz</title>
	<atom:link href="http://piotr.eldora.pl/feed" rel="self" type="application/rss+xml" />
	<link>http://piotr.eldora.pl</link>
	<description>Ideas not to be forgotten...</description>
	<lastBuildDate>Wed, 11 Jan 2012 20:14:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Bank mBank eksportowanie listy wszystkich odbiorców do pliku</title>
		<link>http://piotr.eldora.pl/2011/05/27/bank-mbank-eksportowanie-wszystkich-odbiorcow-do-pliku</link>
		<comments>http://piotr.eldora.pl/2011/05/27/bank-mbank-eksportowanie-wszystkich-odbiorcow-do-pliku#comments</comments>
		<pubDate>Fri, 27 May 2011 19:40:36 +0000</pubDate>
		<dc:creator>Piotr Zaniewicz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Win]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[eksport]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[lista]]></category>
		<category><![CDATA[mbank]]></category>
		<category><![CDATA[odbiorców]]></category>
		<category><![CDATA[odbiorcy]]></category>

		<guid isPermaLink="false">http://piotr.eldora.pl/?p=155</guid>
		<description><![CDATA[Niestety żaden Polski bank nie udostępnia funkcji eksportowania wprowadzonych odbiorców. W tym celu napisałem skrypt, który pozwala to osiągnąć osobom korzystającym z konta w mBanku. Po wprowadzeniu podstawowych danych skrypt loguje się na strony banku i ściąga wszystkich odbiorców. Następnie zapisuje ich do pliku CSV. Plik PHPS jest dostępny tutaj. W razie problemów służę pomocą, [...]]]></description>
			<content:encoded><![CDATA[<p>Niestety żaden Polski bank nie udostępnia funkcji eksportowania wprowadzonych odbiorców.<br />
W tym celu napisałem skrypt, który pozwala to osiągnąć osobom korzystającym z konta w mBanku.<br />
Po wprowadzeniu podstawowych danych skrypt loguje się na strony banku i ściąga wszystkich odbiorców. Następnie zapisuje ich do pliku CSV.</p>
<p>Plik PHPS jest dostępny <a href="http://piotr.eldora.pl/.downloads/mbank_eksport_odb.phps">tutaj</a>.</p>
<p>W razie problemów służę pomocą, a za przekazaniem drobnego wsparcia mogę za kogoś przeprowadzić eksport. Oczywiście dyskrecja gwarantowana.</p>
]]></content:encoded>
			<wfw:commentRss>http://piotr.eldora.pl/2011/05/27/bank-mbank-eksportowanie-wszystkich-odbiorcow-do-pliku/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Windows wireless network changing batch script</title>
		<link>http://piotr.eldora.pl/2011/03/02/windows-wireless-network-changing-batch-script</link>
		<comments>http://piotr.eldora.pl/2011/03/02/windows-wireless-network-changing-batch-script#comments</comments>
		<pubDate>Tue, 01 Mar 2011 23:21:41 +0000</pubDate>
		<dc:creator>Piotr Zaniewicz</dc:creator>
				<category><![CDATA[Win]]></category>
		<category><![CDATA[bat batch windows network netsh jdownloader new ip routing]]></category>

		<guid isPermaLink="false">http://piotr.eldora.pl/?p=146</guid>
		<description><![CDATA[I had a need to write a batch (.bat) script under windows to change the wireless network that the computer is connected to. The script is very simple and requires writing permission on C: drive but you can change the folder if you want. You also need to make sure that network profiles are already [...]]]></description>
			<content:encoded><![CDATA[<p>I had a need to write a batch (.bat) script under windows to change the wireless network that the computer is connected to.<br />
The script is very simple and requires writing permission on C: drive but you can change the folder if you want. You also need to make sure that network profiles are already defined (i.e. you were once successfully connected to the networks provided).</p>

<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
20
</pre></td><td class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #33cc33;">@</span><span style="color: #b1b100; font-weight: bold;">echo</span> off
<span style="color: #b1b100; font-weight: bold;">cd</span> c:\
<span style="color: #b1b100; font-weight: bold;">set</span> net1=name_of_network_1
<span style="color: #b1b100; font-weight: bold;">set</span> net2=name_of_network_2
<span style="color: #b1b100; font-weight: bold;">set</span> net3=name of network 3
<span style="color: #b1b100; font-weight: bold;">set</span> /p net0= <span style="color: #33cc33;">&lt;</span>net
<span style="color: #00b100; font-weight: bold;">if</span> &quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">net0</span><span style="color: #33cc33;">%</span>&quot;==&quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">net1</span><span style="color: #33cc33;">%</span>&quot; <span style="color: #33cc33;">(</span>
	<span style="color: #b1b100; font-weight: bold;">echo</span> <span style="color: #33cc33;">%</span><span style="color: #448888;">net3</span><span style="color: #33cc33;">%&gt;</span>net
	<span style="color: #b1b100; font-weight: bold;">set</span> net=<span style="color: #33cc33;">%</span><span style="color: #448888;">net3</span><span style="color: #33cc33;">%</span>
	<span style="color: #33cc33;">)</span> <span style="color: #00b100; font-weight: bold;">else</span> <span style="color: #33cc33;">(</span>
		<span style="color: #00b100; font-weight: bold;">if</span> &quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">net0</span><span style="color: #33cc33;">%</span>&quot;==&quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">net2</span><span style="color: #33cc33;">%</span>&quot; <span style="color: #33cc33;">(</span>
		<span style="color: #b1b100; font-weight: bold;">echo</span> <span style="color: #33cc33;">%</span><span style="color: #448888;">net1</span><span style="color: #33cc33;">%&gt;</span>net
		<span style="color: #b1b100; font-weight: bold;">set</span> net=<span style="color: #33cc33;">%</span><span style="color: #448888;">net1</span><span style="color: #33cc33;">%</span>
	<span style="color: #33cc33;">)</span> <span style="color: #00b100; font-weight: bold;">else</span> <span style="color: #33cc33;">(</span>
		<span style="color: #b1b100; font-weight: bold;">echo</span> <span style="color: #33cc33;">%</span><span style="color: #448888;">net2</span><span style="color: #33cc33;">%&gt;</span>net
		<span style="color: #b1b100; font-weight: bold;">set</span> net=<span style="color: #33cc33;">%</span><span style="color: #448888;">net2</span><span style="color: #33cc33;">%</span>
	<span style="color: #33cc33;">)</span>
<span style="color: #33cc33;">)</span>
netsh wlan disconnect
netsh wlan connect &quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">net</span><span style="color: #33cc33;">%</span>&quot;</pre></td></tr></table></div>

<p>It can be used for example if one of the wireless networks is down.<br />
You can use it in other situations, when you need a different routing or a different IP address (e.g. jDownloader).</p>
]]></content:encoded>
			<wfw:commentRss>http://piotr.eldora.pl/2011/03/02/windows-wireless-network-changing-batch-script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wysyłanie smsów przez bramkę orange.pl &#8211; aktualizacja</title>
		<link>http://piotr.eldora.pl/2010/12/02/wysylanie-smsow-przez-bramke-orange-pl-aktualizacja</link>
		<comments>http://piotr.eldora.pl/2010/12/02/wysylanie-smsow-przez-bramke-orange-pl-aktualizacja#comments</comments>
		<pubDate>Wed, 01 Dec 2010 23:03:16 +0000</pubDate>
		<dc:creator>Piotr Zaniewicz</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://piotr.eldora.pl/?p=136</guid>
		<description><![CDATA[Skrypt został dostosowany do nowych wymagań strony serwisu orange.pl. Zmiany na pierwszy rzut oka są kosmetyczne (pola post i wylogowywanie), ale bynajmniej nie powinien podnosić alarmu po stronie serwisu orange.pl. Plik phps został zaktualizowany. Zalecam aktualizację do tej wersji.]]></description>
			<content:encoded><![CDATA[<p>Skrypt został dostosowany do nowych wymagań strony serwisu orange.pl.<br />
Zmiany na pierwszy rzut oka są kosmetyczne (pola post i wylogowywanie), ale bynajmniej nie powinien podnosić alarmu po stronie serwisu orange.pl.</p>
<p>Plik <a href="http://piotr.eldora.pl/.downloads/mbox_sender.phps">phps</a> został zaktualizowany.<br />
Zalecam aktualizację do tej wersji.</p>
]]></content:encoded>
			<wfw:commentRss>http://piotr.eldora.pl/2010/12/02/wysylanie-smsow-przez-bramke-orange-pl-aktualizacja/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Mathematics skill testing quiz</title>
		<link>http://piotr.eldora.pl/2010/04/25/mathematics-skill-testing-quiz</link>
		<comments>http://piotr.eldora.pl/2010/04/25/mathematics-skill-testing-quiz#comments</comments>
		<pubDate>Sun, 25 Apr 2010 16:46:45 +0000</pubDate>
		<dc:creator>Piotr Zaniewicz</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[maths]]></category>
		<category><![CDATA[quiz]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://piotr.eldora.pl/?p=126</guid>
		<description><![CDATA[In case you need to practice your basic maths skills, you can use my freshly developed online maths skills quiz. I have developed it in PHP and it uses Ajax scripting to retrieve new questions. All questions are random, and no results are stored on the server side. In case you are interested in the [...]]]></description>
			<content:encoded><![CDATA[<p>In case you need to practice your basic maths skills, you can use my freshly developed online <a href="http://piotr.eldora.pl/.tools/mathquiz/">maths skills quiz</a>.</p>
<p>I have developed it in PHP and it uses Ajax scripting to retrieve new questions. All questions are random, and no results are stored on the server side.</p>
<p>In case you are interested in the source code. Let me know, I will be happy to share it with you.</p>
<p>Good luck !</p>
]]></content:encoded>
			<wfw:commentRss>http://piotr.eldora.pl/2010/04/25/mathematics-skill-testing-quiz/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fractions in PHP and whole numbers</title>
		<link>http://piotr.eldora.pl/2010/04/20/fractions-in-php-and-whole-numbers</link>
		<comments>http://piotr.eldora.pl/2010/04/20/fractions-in-php-and-whole-numbers#comments</comments>
		<pubDate>Tue, 20 Apr 2010 16:52:38 +0000</pubDate>
		<dc:creator>Piotr Zaniewicz</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://piotr.eldora.pl/?p=117</guid>
		<description><![CDATA[I have been searching for a good PHP class for fraction handling and found Math_Fraction in the PEAR database. However, it was still lacking a possibility to display the whole numbers of a fraction and I had to rewrite the last function in the Fraction.php file. Here it is: 1 2 3 4 5 6 [...]]]></description>
			<content:encoded><![CDATA[<p>I have been searching for a good PHP class for fraction handling and found <a href="http://pear.php.net/package/Math_Fraction/">Math_Fraction</a> in the PEAR database.<br />
However, it was still lacking a possibility to display the whole numbers of a fraction and I had to rewrite the last function in the Fraction.php file.<br />
Here it is:</p>

<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;">function</span> toString<span style="color: #009900;">&#40;</span><span style="color: #000088;">$whole</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$n</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getNum</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$d</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getDen</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$whole</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$d</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$n</span>/<span style="color: #006699; font-weight: bold;">$d</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">==</span><span style="color: #000088;">$d</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$d</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">return</span> <span style="color: #990000;">floatval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$d</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$w</span> <span style="color: #339933;">=</span> <span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">/</span><span style="color: #000088;">$d</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$n</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$d</span><span style="color: #339933;">*</span><span style="color: #000088;">$w</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$w</span> <span style="color: #006699; font-weight: bold;">$n</span>/<span style="color: #006699; font-weight: bold;">$d</span>&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>I have also informed the maintainer about it, so he might update it some time.<br />
Meanwhile I invite you to use this simple, yet effective solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://piotr.eldora.pl/2010/04/20/fractions-in-php-and-whole-numbers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wysyłanie SMS przez bramkę mBox orange.pl &#8211; wykorzystanie php+curl</title>
		<link>http://piotr.eldora.pl/2009/09/18/wysylanie-sms-przez-bramke-mbox-orange-pl-wykorzystanie-phpcurl</link>
		<comments>http://piotr.eldora.pl/2009/09/18/wysylanie-sms-przez-bramke-mbox-orange-pl-wykorzystanie-phpcurl#comments</comments>
		<pubDate>Fri, 18 Sep 2009 01:45:46 +0000</pubDate>
		<dc:creator>Piotr Zaniewicz</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://piotr.eldora.pl/?p=91</guid>
		<description><![CDATA[Trochę uporządkowałem skrypty i postanowiłem udostępnić skrypt do wysyłania sms&#8217;ów przez bramkę mBox orange.pl. Jestem ciekawy ewentualnych ulepszeń, więc jak coś to proszę podsyłać nowe wersje UPDATE: Skrypt został wzbogacony o możliwość wysyłania dowolnie długich wiadomości. Dzieli wpisaną wiadomość na 640 znaków i wysyła funkcją jako osobne smsy. Ponadto, końcowy stan smsów jest pobierany przez [...]]]></description>
			<content:encoded><![CDATA[<p>Trochę uporządkowałem skrypty i postanowiłem udostępnić skrypt do wysyłania sms&#8217;ów przez bramkę mBox orange.pl.</p>
<p>Jestem ciekawy ewentualnych ulepszeń, więc jak coś to proszę podsyłać nowe wersje <img src='http://piotr.eldora.pl/weblog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong><em>UPDATE:</em></strong><br />
Skrypt został wzbogacony o możliwość wysyłania dowolnie długich wiadomości. Dzieli wpisaną wiadomość na 640 znaków i wysyła funkcją jako osobne smsy.<br />
Ponadto, końcowy stan smsów jest pobierany przez Xpath.</p>
<p><a href="http://piotr.eldora.pl/.downloads/mbox_sender.phps">Plik PHPS</a></p>
]]></content:encoded>
			<wfw:commentRss>http://piotr.eldora.pl/2009/09/18/wysylanie-sms-przez-bramke-mbox-orange-pl-wykorzystanie-phpcurl/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Spamassassin + vpopmail + sa-learn + learning from IMAP folders</title>
		<link>http://piotr.eldora.pl/2009/05/17/spamassassin-vpopmail-sa-learn-learning-from-imap-folders</link>
		<comments>http://piotr.eldora.pl/2009/05/17/spamassassin-vpopmail-sa-learn-learning-from-imap-folders#comments</comments>
		<pubDate>Sat, 16 May 2009 22:37:33 +0000</pubDate>
		<dc:creator>Piotr Zaniewicz</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://piotr.eldora.pl/?p=79</guid>
		<description><![CDATA[Below is a quick solution to making spamassassin learn from specific IMAP folders. Script represents a daily cron script and I just used sudo vpopmail (has to be the same as your spamd user) to simplify things. You probably should use user specific crontab&#8230; 1 2 3 4 5 #!/bin/bash for F in `find /home/vpopmail/domains [...]]]></description>
			<content:encoded><![CDATA[<p>Below is a quick solution to making spamassassin learn from specific IMAP folders. Script represents a daily cron script and I just used <em>sudo vpopmail</em> (has to be the same as your spamd user) to simplify things. You probably should use user specific crontab&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #000000; font-weight: bold;">for</span> F <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>vpopmail<span style="color: #000000; font-weight: bold;">/</span>domains <span style="color: #660033;">-type</span> d <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'.Junk'</span> -print<span style="color: #000000; font-weight: bold;">`</span>;
<span style="color: #000000; font-weight: bold;">do</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #660033;">-H</span> <span style="color: #660033;">-u</span> vpopmail <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>sa-learn <span style="color: #660033;">--spam</span> <span style="color: #007800;">$F</span><span style="color: #000000; font-weight: bold;">/</span>cur<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">&amp;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$F</span><span style="color: #000000; font-weight: bold;">/</span>cur<span style="color: #000000; font-weight: bold;">/*</span>;
<span style="color: #000000; font-weight: bold;">done</span>;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://piotr.eldora.pl/2009/05/17/spamassassin-vpopmail-sa-learn-learning-from-imap-folders/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php strpos array</title>
		<link>http://piotr.eldora.pl/2009/03/26/php-strpos-array</link>
		<comments>http://piotr.eldora.pl/2009/03/26/php-strpos-array#comments</comments>
		<pubDate>Thu, 26 Mar 2009 05:57:20 +0000</pubDate>
		<dc:creator>Piotr Zaniewicz</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://piotr.eldora.pl/?p=65</guid>
		<description><![CDATA[I needed a PHP function to check whether a string contained one of the array values. As we know strpos does&#8217;t accept input as an array so I had to tweak it  bit. Below is an example of what I did: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a PHP function to check whether a string contained one of the array values. As we know strpos does&#8217;t accept input as an array so I had to tweak it  bit. Below is an example of what I did:</p>

<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
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> strpos_array<span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #339933;">,</span> <span style="color: #000088;">$values</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$hits</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//will give number of values found in a string</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$try</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$pos</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #339933;">,</span> <span style="color: #000088;">$try</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$pos</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$hits</span><span style="color: #339933;">++;</span> <span style="color: #666666; font-style: italic;">// you can do array_push here to get the values</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$hits</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">//if none value from array was found returns false</span>
        <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">//I just needed a simple true/false boolean</span>
       <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://piotr.eldora.pl/2009/03/26/php-strpos-array/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FPDF polskie wolne czcionki</title>
		<link>http://piotr.eldora.pl/2009/01/19/fpdf-polskie-wolne-czcionki</link>
		<comments>http://piotr.eldora.pl/2009/01/19/fpdf-polskie-wolne-czcionki#comments</comments>
		<pubDate>Mon, 19 Jan 2009 11:13:26 +0000</pubDate>
		<dc:creator>Piotr Zaniewicz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[linux fpdf gpl wolne]]></category>

		<guid isPermaLink="false">http://piotr.eldora.pl/?p=39</guid>
		<description><![CDATA[Postanowiłem wreszcie trochę uporządkować czcionki używane do generowania dokumentów pdf oraz obrazków wykorzystujących czcionki ttf. Załączam zestaw gotowej do zainstalowania czytelnej czcionki z pakietu liberation-fonts. Które są upowszechnione na licencji GPL. Pobierz]]></description>
			<content:encoded><![CDATA[<p>Postanowiłem wreszcie trochę uporządkować czcionki używane do generowania dokumentów pdf oraz obrazków wykorzystujących czcionki ttf. Załączam zestaw gotowej do zainstalowania czytelnej czcionki z pakietu <a href="https://fedorahosted.org/liberation-fonts/">liberation-fonts</a>. Które są upowszechnione na licencji GPL.</p>
<p><a href="http://piotr.eldora.pl/weblog/wp-content/uploads/2009/01/fonttar.bz2">Pobierz</a></p>
]]></content:encoded>
			<wfw:commentRss>http://piotr.eldora.pl/2009/01/19/fpdf-polskie-wolne-czcionki/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Odmiana imion php mysql</title>
		<link>http://piotr.eldora.pl/2009/01/12/odmiana-imion-php-mysql</link>
		<comments>http://piotr.eldora.pl/2009/01/12/odmiana-imion-php-mysql#comments</comments>
		<pubDate>Mon, 12 Jan 2009 03:26:57 +0000</pubDate>
		<dc:creator>Piotr Zaniewicz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[imiona]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[odmiona]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://piotr.eldora.pl/?p=28</guid>
		<description><![CDATA[Postanowiłem udostępnić uzupełniony zbiór odmian polskich imion dla bazy MySQL. Plik jest gotowy do importu do bazy MySQL, zawiera imiona,  odmianę, płeć oraz ilość sylab występujących w imieniu. Można go wykorzystać na przykład w skryptach php wysyłających życzenia urodzinowe lub pozdrowienia. W przypadku braku odmiany, proszę wpisać w komentarzach to uzupełnię.]]></description>
			<content:encoded><![CDATA[<p>Postanowiłem udostępnić uzupełniony zbiór <a href="http://piotr.eldora.pl/bazy-danych-kody-pocztowe-imiona-panstwa">odmian polskich imion</a> dla bazy MySQL.</p>
<p>Plik jest gotowy do importu do bazy MySQL, zawiera imiona,  odmianę, płeć oraz ilość sylab występujących w imieniu. Można go wykorzystać na przykład w skryptach php wysyłających życzenia urodzinowe lub pozdrowienia.</p>
<p>W przypadku braku odmiany, proszę wpisać w komentarzach to uzupełnię.</p>
]]></content:encoded>
			<wfw:commentRss>http://piotr.eldora.pl/2009/01/12/odmiana-imion-php-mysql/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: piotr.eldora.pl @ 2012-02-06 21:58:08 -->
