<?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; HTML</title>
	<atom:link href="http://abeontech.com/tag/html/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>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>Centering divs</title>
		<link>http://abeontech.com/350-webdesign-centering-divs</link>
		<comments>http://abeontech.com/350-webdesign-centering-divs#comments</comments>
		<pubDate>Mon, 14 Jun 2010 00:34:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=350</guid>
		<description><![CDATA[I often get asked how to properly align divs and containers on website pages.
The most common bugbear is centering divs either vertically and horizontally, which can be a pain unless you know how.
This post has three examples of how to position the divs and should help clear up any confusion you may have.]]></description>
			<content:encoded><![CDATA[<p>I often get asked how to properly align divs and containers on website pages.<br />
The most common bugbear is centering divs either vertically and horizontally, which can be a pain unless you know how.<br />
This post has three examples of how to position the divs and should help clear up any confusion you may have.</p>
<p>Text is simple to align with css using the &#8220;text-align&#8221; property, as below:</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">// CSS<br />
.positionme { text-align:center }<br />
<br />
// HTML<br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;positionme&quot;</span>&gt;</span><br />
Position Me!<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">pre</span>&gt;</span></div></div>
<p>Positioning a div to center vertically and horizontally is a little trickier, but easy when you know how!<br />
Let&#8217;s start with centering the div horizontally:</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">// CSS<br />
.positionme { text-align:center; width:250px; margin:auto auto }<br />
<br />
// HTML<br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;positionme&quot;</span>&gt;</span><br />
Position Me!<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">pre</span>&gt;</span></div></div>
<p>We can use a similar trick to get the div positioned centered vertically too:</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">// CSS<br />
.positionme { text-align:center; width:250px;height:250px;<br />
&nbsp; &nbsp; &nbsp; &nbsp;left:50%; top:50%;<br />
&nbsp; &nbsp; &nbsp; &nbsp;margin:-125px 0 0 -125px;<br />
&nbsp;}<br />
<br />
// HTML<br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;positionme&quot;</span>&gt;</span><br />
Position Me!<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">pre</span>&gt;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/350-webdesign-centering-divs/feed</wfw:commentRss>
		<slash:comments>0</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>Css Image Hover Effect</title>
		<link>http://abeontech.com/34-webdesign-css-image-hover-effect</link>
		<comments>http://abeontech.com/34-webdesign-css-image-hover-effect#comments</comments>
		<pubDate>Tue, 02 Sep 2008 19:19:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.abeontech.com/?p=34</guid>
		<description><![CDATA[With CSS all you need to do is put a piece of code in your style sheet to automagically make image or text rollovers.
You don't need a second image or messy scripting.]]></description>
			<content:encoded><![CDATA[<p>With CSS all you need to do is put a piece of code in your style sheet to automagically make image or text rollovers.<br />
You don&#8217;t need a second image or messy scripting.</p>
<p><span id="more-34"></span></p>
<p><strong>Step 1</strong></p>
<p>Put the code in the head section of your page between the head tags, like in the below example:</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;">head</span>&gt;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>CSS Image Hover Effect<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp;#center{ text-align:center; padding:auto auto auto auto;}<br />
&nbsp; &nbsp; &nbsp;a.linkopacity img {<br />
&nbsp; &nbsp; &nbsp;filter:alpha(opacity=50);<br />
&nbsp; &nbsp; &nbsp;-moz-opacity: 0.5;<br />
&nbsp; &nbsp; &nbsp;opacity: 0.5;<br />
&nbsp; &nbsp; &nbsp;-khtml-opacity: 0.5;}<br />
<br />
&nbsp; &nbsp; &nbsp;a.linkopacity:hover img {<br />
&nbsp; &nbsp; &nbsp;filter:alpha(opacity=100);<br />
&nbsp; &nbsp; &nbsp;-moz-opacity: 1.0;<br />
&nbsp; &nbsp; &nbsp;opacity: 1.0;<br />
&nbsp; &nbsp; &nbsp;-khtml-opacity: 1.0; }<br />
&nbsp; &nbsp;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span></div></div>
<p>You only have to do this once.</p>
<p><strong>Step 2</strong></p>
<p>Then add a class=&#8221;linkopacity&#8221; to the link when you want to make the rollover.<br />
It works with hyperlinked text and images.</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;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;linkopacity&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;CSS-Rollover&quot;</span> &gt;</span><br />
<span style="color: #009900;">&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;http://abeon-hosting.com/examples/css-image-hover-effect/css2.jpg&quot;</span> <span style="color: #000066;">border</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;border:1px solid black;&quot;</span> &nbsp;<span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;50&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;50&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;CSS tutorials&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;linkopacity&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;CSS-Design&quot;</span> &gt;</span><br />
<span style="color: #009900;">&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;http://abeon-hosting.com/examples/css-image-hover-effect/css1.jpg&quot;</span> <span style="color: #000066;">border</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;border:1px solid black;&quot;</span> &nbsp;<span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;50&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;50&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;WebDesign tutorials&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;linkopacity&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;CSS-Effect&quot;</span> &gt;</span><br />
<span style="color: #009900;">&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;http://abeon-hosting.com/examples/css-image-hover-effect/CSS-Stylesheets.gif&quot;</span> <span style="color: #000066;">border</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;border:1px solid black;&quot;</span> &nbsp;<span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;50&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;50&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Hosting tutorials&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></div></div>
<p>Note:<br />
Even though this code isn&#8217;t strict standards compliant, all the style information should go in the CSS file too!</p>
]]></content:encoded>
			<wfw:commentRss>http://abeontech.com/34-webdesign-css-image-hover-effect/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

