<?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>SecureSlash.com &#187; PHP Scripting</title>
	<atom:link href="http://secureslash.com/category/php-scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://secureslash.com</link>
	<description>Because security matters</description>
	<lastBuildDate>Fri, 20 Jan 2012 10:58:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Apache Benchmark Results &#8211; PHP vs PERL</title>
		<link>http://secureslash.com/apache/php-vs-perl-an-apache-benchmark-results-2/</link>
		<comments>http://secureslash.com/apache/php-vs-perl-an-apache-benchmark-results-2/#comments</comments>
		<pubDate>Thu, 08 May 2008 18:58:57 +0000</pubDate>
		<dc:creator>paimpozhil</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP Scripting]]></category>
		<category><![CDATA[Web Administration]]></category>
		<category><![CDATA[apache benchmark test]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php vs perl]]></category>

		<guid isPermaLink="false">http://secureslash.com/?p=88</guid>
		<description><![CDATA[Tweet I have used Apache Benchmarking tool and ran it for 1000 requests with concurrenncy 2 You can learn about this tool on http://httpd.apache.org/docs/2.0/programs/ab.html Testing PHP This is the result of Processing the Whole secureslash.com/index.php . We have sent 1000 request to it to see how it performs. PHP Results: * Requests per second:Â Â Â  85.96 [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fsecureslash.com%2Fapache%2Fphp-vs-perl-an-apache-benchmark-results-2%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://secureslash.com/apache/php-vs-perl-an-apache-benchmark-results-2/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://secureslash.com/apache/php-vs-perl-an-apache-benchmark-results-2/"  data-text="Apache Benchmark Results &#8211; PHP vs PERL" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://secureslash.com/apache/php-vs-perl-an-apache-benchmark-results-2/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://secureslash.com/apache/php-vs-perl-an-apache-benchmark-results-2/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>I have used Apache Benchmarking tool and ran it for 1000 requests with<br />
concurrenncy 2</p>
<p>You can learn about this tool  on <a title="Apache Benchmark Tool" href="http://httpd.apache.org/docs/2.0/programs/ab.html" target="_blank">http://httpd.apache.org/docs/2.0/programs/ab.html</a><br />
<script type="text/javascript"><!--
google_ad_client = "pub-1553934370392546";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text";
//2007-08-15: SecureSlash - SideBox
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "2f63b3";
google_color_text = "000000";
google_color_url = "CCCCCC";

//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
<strong>Testing PHP</strong></p>
<p>This is the result of Processing the Whole secureslash.com/index.php . We have sent 1000 request to<br />
it to see  how it performs.</p>
<p><strong>PHP Results:</strong><br />
<script type="text/javascript"><!--
google_ad_client = "pub-1553934370392546";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text";
//2007-08-15: SecureSlash - SideBox
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "2f63b3";
google_color_text = "000000";
google_color_url = "CCCCCC";

//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</p>
<blockquote><p>*<br />
Requests per second:Â Â Â  85.96 [#/sec] (mean)<br />
Time per  request:Â Â Â Â Â Â  58.168 [ms] (mean)<br />
Time per request:Â Â Â Â Â Â  11.634 [ms] (mean,  across all concurrent requests)<br />
*</p>
<p>This is ApacheBench, Version  2.0.40-dev &lt;$Revision: 1.146 $&gt; apache-2.0<br />
Copyright 1996 Adam Twiss,  Zeus Technology Ltd, <a href="http://www.zeustech.net/">http://www.zeustech.net/</a><br />
Copyright  1997-2005 The Apache Software Foundation, <a href="http://www.apache.org/">http://www.apache.org/</a></p>
<p>Benchmarking secureslash .com (be patient)<br />
Completed 100 requests<br />
Completed 200  requests<br />
Completed 300 requests<br />
Completed 400 requests<br />
Completed 500  requests<br />
Completed 600 requests<br />
Completed 700 requests<br />
Completed 800  requests<br />
Completed 900 requests<br />
Finished 1000 requests</p>
<p>Server  Software:Â Â Â Â Â Â Â  Apache/2.2.6<br />
Server Hostname:Â Â Â Â Â Â Â  secureslash.com<br />
Server  Port:Â Â Â Â Â Â Â Â Â Â Â  80</p>
<p>Document Path:Â Â Â Â Â Â Â Â Â  /<br />
Document Length:Â Â Â Â Â Â Â   23188 bytes</p>
<p>Concurrency Level:Â Â Â Â Â  5<br />
Time taken for tests:Â Â   11.633571 seconds<br />
Complete requests:Â Â Â Â Â  1000<br />
Failed requests:Â Â Â Â Â Â Â   0<br />
Write errors:Â Â Â Â Â Â Â Â Â Â  0<br />
Total transferred:Â Â Â Â Â  24052000 bytes<br />
HTML  transferred:Â Â Â Â Â Â  23188000 bytes<br />
Requests per second:Â Â Â  85.96 [#/sec]  (mean)<br />
Time per request:Â Â Â Â Â Â  58.168 [ms] (mean)<br />
Time per request:Â Â Â Â Â Â   11.634 [ms] (mean, across all concurrent requests)<br />
Transfer rate:Â Â Â Â Â Â Â Â Â   2018.98 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
minÂ   mean[+/-sd] medianÂ Â  max<br />
Connect:Â Â Â Â Â Â Â  0Â Â Â  2Â Â  4.0Â Â Â Â Â  1Â Â Â Â Â   27<br />
Processing:Â Â Â  26Â Â  55 114.2Â Â Â Â  37Â Â Â  1357<br />
Waiting:Â Â Â Â Â Â  21Â Â  44  114.2Â Â Â Â  28Â Â Â  1349<br />
Total:Â Â Â Â Â Â Â Â  26Â Â  57 114.5Â Â Â Â  39Â Â Â   1364</p>
<p>Percentage of the requests served within a certain time  (ms)<br />
50%Â Â Â Â  39<br />
66%Â Â Â Â  45<br />
75%Â Â Â Â  51<br />
80%Â Â Â Â  54<br />
90%Â Â Â Â   65<br />
95%Â Â Â Â  77<br />
98%Â Â Â  195<br />
99%Â Â Â  804<br />
100%Â Â  1364 (longest  request)</p></blockquote>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong>Testing Perl</strong></p>
<p>This Is a result of JUST HELLOWORLD Program in cgi bin &#8212; &gt; secureslash.com/cgi-bin/index.cgi see  the<br />
times below it is SLOWER than php .</p>
<p><strong>PERL Results</strong></p>
<blockquote><p>*<br />
Requests per second:Â Â Â   86.01 [#/sec] (mean)<br />
Time per request:Â Â Â Â Â Â  58.131 [ms] (mean)<br />
Time per  request:Â Â Â Â Â Â  11.626 [ms] (mean, across all concurrent  requests)*</p>
<p>This is ApacheBench, Version 2.0.40-dev &lt;$Revision:  1.146 $&gt; apache-2.0<br />
Copyright 1996 Adam Twiss, Zeus Technology Ltd, <a href="http://www.zeustech.net/">http://www.zeustech.net/</a><br />
Copyright  1997-2005 The Apache Software Foundation, <a href="http://www.apache.org/">http://www.apache.org/</a></p>
<p>Benchmarking secureslash.com (be patient)<br />
Completed 100 requests<br />
Completed 200  requests<br />
Completed 300 requests<br />
Completed 400 requests<br />
Completed 500  requests<br />
Completed 600 requests<br />
Completed 700 requests<br />
Completed 800  requests<br />
Completed 900 requests<br />
Finished 1000 requests</p>
<p>Server  Software:Â Â Â Â Â Â Â  Apache/2.2.8<br />
Server Hostname:Â Â Â Â Â Â Â  secureslash.com.com<br />
Server  Port:Â Â Â Â Â Â Â Â Â Â Â  80</p>
<p>Document Path:Â Â Â Â Â Â Â Â Â  /cgi-bin/index.cgi<br />
Document  Length:Â Â Â Â Â Â Â  12 bytes</p>
<p>Concurrency Level:Â Â Â Â Â  5<br />
Time taken for  tests:Â Â  11.626206 seconds<br />
Complete requests:Â Â Â Â Â  1000<br />
Failed  requests:Â Â Â Â Â Â Â  0<br />
Write errors:Â Â Â Â Â Â Â Â Â Â  0<br />
Total transferred:Â Â Â Â Â   258320 bytes<br />
HTML transferred:Â Â Â Â Â Â  12000 bytes<br />
Requests per second:Â Â Â   86.01 [#/sec] (mean)<br />
Time per request:Â Â Â Â Â Â  58.131 [ms] (mean)<br />
Time per  request:Â Â Â Â Â Â  11.626 [ms] (mean, across all concurrent requests)<br />
Transfer  rate:Â Â Â Â Â Â Â Â Â  21.68 [Kbytes/sec] received</p>
<p>Connection Times  (ms)<br />
minÂ  mean[+/-sd] medianÂ Â  max<br />
Connect:Â Â Â Â Â Â Â  0Â Â Â  0Â Â   0.0Â Â Â Â Â  0Â Â Â Â Â Â  0<br />
Processing:Â Â Â Â  5Â Â  56 206.2Â Â Â Â Â  7Â Â Â   2441<br />
Waiting:Â Â Â Â Â Â Â  5Â Â  56 205.9Â Â Â Â Â  7Â Â Â  2441<br />
Total:Â Â Â Â Â Â Â Â Â  5Â Â  56  206.2Â Â Â Â Â  7Â Â Â  2441</p>
<p>Percentage of the requests served within a certain  time (ms)<br />
50%Â Â Â Â Â  7<br />
66%Â Â Â Â  11<br />
75%Â Â Â Â  13<br />
80%Â Â Â Â   15<br />
90%Â Â Â Â  25<br />
95%Â Â Â  508<br />
98%Â Â Â  821<br />
99%Â Â  1027<br />
100%Â Â  2441  (longest request)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p></blockquote>
<p>Moral is <span style="color: #ff0000;"><strong>PHP is faster than CGI-Perl.</strong></span></p>
]]></content:encoded>
			<wfw:commentRss>http://secureslash.com/apache/php-vs-perl-an-apache-benchmark-results-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHPBB Guest visitors info listing</title>
		<link>http://secureslash.com/php-scripting/phpbb-guest-visitors-info-listing/</link>
		<comments>http://secureslash.com/php-scripting/phpbb-guest-visitors-info-listing/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 20:43:24 +0000</pubDate>
		<dc:creator>paimpozhil</dc:creator>
				<category><![CDATA[PHP Scripting]]></category>
		<category><![CDATA[Web Administration]]></category>

		<guid isPermaLink="false">http://secureslash.com/php-scripting/phpbb-guest-visitors-info-listing/</guid>
		<description><![CDATA[Tweet Sometimes, We need to monitor that, Who is visiting our forum without logging in. People who struggled a lot with spammers on their phpbb board should need some monitoring script to trace the guests. Save the below code as &#8220;infolist.php&#8221;; &#60;?php include "config.php"; mysql_connect($dbhost,$dbuser,$dbpasswd); mysql_select_db($dbname); $sql = mysql_query("SELECT * FROM `phpbb_sessions` where `session_user_id` = [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fsecureslash.com%2Fphp-scripting%2Fphpbb-guest-visitors-info-listing%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://secureslash.com/php-scripting/phpbb-guest-visitors-info-listing/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://secureslash.com/php-scripting/phpbb-guest-visitors-info-listing/"  data-text="PHPBB Guest visitors info listing" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://secureslash.com/php-scripting/phpbb-guest-visitors-info-listing/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://secureslash.com/php-scripting/phpbb-guest-visitors-info-listing/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>Sometimes, We need to monitor that, Who is visiting our forum without logging in. People who struggled a lot with spammers on their phpbb board should need some monitoring script to trace the guests.</p>
<p><a href="http://www.phpbb.com" title="phpbb" target="_blank"><img src="http://www.forumflex.com/phpbb_logo.gif" title="PHPBB Logo" alt="PHPBB Logo" height="150" width="250" /></a><br />
<!--adsense--><br />
Save the below code as &#8220;infolist.php&#8221;;</p>
<blockquote>
<pre>&lt;?php

include "config.php";

mysql_connect($dbhost,$dbuser,$dbpasswd);

mysql_select_db($dbname);

$sql = mysql_query("SELECT * FROM `phpbb_sessions` where

`session_user_id` = '-1' group by `session_ip` order by `session_time`

asc ");

echo ("IP Address - HostName - Start Time - End Time -  VisitingPage&lt;br

/&gt; ");

while(($result = mysql_fetch_assoc($sql)))

{

$r = $result;

echo decode_ip($r["session_ip"])  .  " - " .

gethostbyaddr(decode_ip($r["session_ip"])) . " - &lt;b&gt;" . date("M d Y

H:i:s",$r["session_start"]) .  " - " . date(" H:i:s",$r["session_time"])

. "&lt;/b&gt;" ;if ($r["session_page"]!=0){

echo '&lt;a href="/forums/viewforum.php?f=' . $r["session_page"]  . '"

target=_blank &gt; Looking into Page &lt;/a&gt;';

}

echo "&lt;br /&gt;";

}

mysql_close();

function decode_ip($int_ip)

{

    $hexipbang = explode('.', chunk_split($int_ip, 2, '.'));

    return hexdec($hexipbang[0]). '.' . hexdec($hexipbang[1]) . '.' .

hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);

}

?&gt;</pre>
</blockquote>
<p>Upload the infolist.php to the phpbb forum root folder.</p>
<p>Code will work fine on any phpbb 2.x.x release.</p>
<p>Hope, It will help someone who fights with blind spammers on their phpbb.</p>
]]></content:encoded>
			<wfw:commentRss>http://secureslash.com/php-scripting/phpbb-guest-visitors-info-listing/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Socks Proxy Scanner PHP Script</title>
		<link>http://secureslash.com/security-tools/socks-proxy-scanner-php-script/</link>
		<comments>http://secureslash.com/security-tools/socks-proxy-scanner-php-script/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 05:42:21 +0000</pubDate>
		<dc:creator>KarthiKeyan</dc:creator>
				<category><![CDATA[Networking & Security]]></category>
		<category><![CDATA[PHP Scripting]]></category>
		<category><![CDATA[Security Tools]]></category>

		<guid isPermaLink="false">http://secureslash.com/security-tools/socks-proxy-scanner-php-script/</guid>
		<description><![CDATA[Tweet A simple socks proxy scanner php script, that uses to check a list of socks proxy servers&#8217; online status. Example: 123.234.12.32:3523 98.45.57.78:9823 23.32.44.23:3785 123.32.45.56:3453 34.75.56.234:9856 save above lines as &#8220;proxies.txt&#8221;. Code:]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fsecureslash.com%2Fsecurity-tools%2Fsocks-proxy-scanner-php-script%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://secureslash.com/security-tools/socks-proxy-scanner-php-script/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://secureslash.com/security-tools/socks-proxy-scanner-php-script/"  data-text="Socks Proxy Scanner PHP Script" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://secureslash.com/security-tools/socks-proxy-scanner-php-script/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://secureslash.com/security-tools/socks-proxy-scanner-php-script/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>A simple socks proxy scanner php script, that uses to check a list of socks proxy servers&#8217; online status.</p>
<p>Example:<br />
123.234.12.32:3523<br />
98.45.57.78:9823<br />
23.32.44.23:3785<br />
123.32.45.56:3453<br />
34.75.56.234:9856</p>
<p>save above lines as &#8220;proxies.txt&#8221;.<br />
<!--adsense--><br />
Code:</p>
<p><?<br />
$filename = "http://domain.tld/filename.ext"; //or a localpath.<br />
$rel=file_get_contents($filename);<br />
$ipset = explode("\n",$rel); // explode it based on your delimiter.<br />
foreach($ipset as $ips)<br />
{<br />
        $ipandport=explode(':',$ips);<br />
        //Porxy string format might be 123.156.189.112:8080<br />
        $host=$ipandport[0];<br />
        $i=(int)$ipandport[1];<br />
        $fp = @fsockopen("tcp://".$host,$i,$errno,$errstr,10);<br />
        // tcp:// because, socks4 uses TCP and socks5 uses TCP &#038; UDP<br />
        if($fp)<br />
       {<br />
              echo("Result is $fp<br />&#8220;);<br />
              echo (&#8220;port &#8221; . $i . &#8221; open on &#8221; . $host . &#8220;<br />&#8220;);<br />
              fclose($fp);<br />
       }<br />
       flush();<br />
}<br />
?></p>
]]></content:encoded>
			<wfw:commentRss>http://secureslash.com/security-tools/socks-proxy-scanner-php-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alpha Software is 10 Times More Efficient than ASP or PHP! &#8211; Funny Quote</title>
		<link>http://secureslash.com/php-scripting/alpha-software-10-times-more-efficient-then-asp-php/</link>
		<comments>http://secureslash.com/php-scripting/alpha-software-10-times-more-efficient-then-asp-php/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 08:48:33 +0000</pubDate>
		<dc:creator>paimpozhil</dc:creator>
				<category><![CDATA[Computer Users]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Opensource World]]></category>
		<category><![CDATA[PHP Scripting]]></category>
		<category><![CDATA[Vidoes]]></category>

		<guid isPermaLink="false">http://secureslash.com/php-scripting/alpha-software-10-times-more-efficient-then-asp-php/</guid>
		<description><![CDATA[Tweet Recently we have got to a site called alpha software somewhere through google , found some very interesting funny pages there. This Alphasoftware claims they are 10x-50x more efficient than the other scripting languages and you can see more of this crap on their site http://www.alphasoftware.com/ ) But i dont get the exact reason [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fsecureslash.com%2Fphp-scripting%2Falpha-software-10-times-more-efficient-then-asp-php%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://secureslash.com/php-scripting/alpha-software-10-times-more-efficient-then-asp-php/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://secureslash.com/php-scripting/alpha-software-10-times-more-efficient-then-asp-php/"  data-text="Alpha Software is 10 Times More Efficient than ASP or PHP! &#8211; Funny Quote" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://secureslash.com/php-scripting/alpha-software-10-times-more-efficient-then-asp-php/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://secureslash.com/php-scripting/alpha-software-10-times-more-efficient-then-asp-php/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>Recently we have got to a site called alpha software somewhere through google , found some very interesting funny pages there.<br />
<!--adsense--><br />
<object type="application/x-shockwave-flash" style="width:425px; height:350px;" data="http://www.youtube.com/v/YrRElbpDJNQ"><param name="movie" value="http://www.youtube.com/v/YrRElbpDJNQ"/></object></p>
<p>This Alphasoftware claims they are 10x-50x more efficient than the other <a href="http://en.wikipedia.org/wiki/Scripting_languages">scripting languages</a></p>
<p>and you can see more of this <a href="http://en.wikipedia.org/wiki/Crap">crap</a> on their site http://www.alphasoftware.com/ <img src='http://secureslash.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )<br />
<!--adsense--><br />
But i dont get the exact reason why they use asp themselves for their homepage</p>
<p>http://www.alphasoftware.com/about/contact.asp</p>
<p>some people might argue that This is not asp , and they might have spoofed the extension with help of their web server mime configurations but Look at this</p>
<p><a href="http://www.alphasoftware.com/resources/it_related_9.asp">http://www.alphasoftware.com/resources/it_related_9.asp</a> and take rest!</p>
<p>why do they use asp that is 10x less effiecient or slower than their AlphaSoftware.</p>
<p>Some more of their technology</p>
<blockquote><p>&#8220;Application Hosting</p>
<p>Once you have built your web application, the next step is to host or deploy your application to the Internet or intranet so that remote users can access your application via a browser. &#8220;</p></blockquote>
<p>So you need to buy all these</p>
<p>Alpha version 5, application server and a runtime</p>
<p>it will cost you Very minimum of 1097 $ (very cheaper than php which i got for free)</p>
<p>https://www.alphasoftware.com/shop/AlphaFive/index.asp?UserType=new&#038;RTSEL=0&#038;V8SEL=0&#038;WASSEL=0</p>
<p>Making some software that eases the people&#8217;s hard tedious work is always good but yelling stuff like 100x faster than this,that ,everything makes us look bad of them.</p>
<p>look at this</p>
<blockquote><p>&#8220;Microsoft Access, Visual Basic, FileMaker, <a href="http://php.net">PHP</a>, ASP, JSP, Cold Fusion all have merit, but none can match the combination of power and simplicity that is the trademark of all Alpha Software solutions.&#8221;</p></blockquote>
<p>Why ? i find <a href="http://rubyonrails.com/">ruby on rails</a> / <a href="http://cakephp.org">cakephp</a> a lot easier than this stuff after seeing few of their demos,etc</p>
<p>and finaly their product doesnt look that impressive decide for yourself <img src='http://secureslash.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
<p>http://afas.alphasoftware.com/SamplePages/</p>
<p><!--adsense--></p>
<p>we are not encouraging them so we didnt provide any link to there website</p>
<p>If you people would like to share some about this you can comment here, make it more fun!.</p>
]]></content:encoded>
			<wfw:commentRss>http://secureslash.com/php-scripting/alpha-software-10-times-more-efficient-then-asp-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Add Paypal Button</title>
		<link>http://secureslash.com/php-scripting/add-paypal-button/</link>
		<comments>http://secureslash.com/php-scripting/add-paypal-button/#comments</comments>
		<pubDate>Thu, 12 Apr 2007 14:28:40 +0000</pubDate>
		<dc:creator>KarthiKeyan</dc:creator>
				<category><![CDATA[Paypal]]></category>
		<category><![CDATA[PHP Scripting]]></category>
		<category><![CDATA[Web Administration]]></category>

		<guid isPermaLink="false">http://secureslash.com/paypal/add-paypal-button/</guid>
		<description><![CDATA[Tweet You can add Paypal button in your website easily. DO NOT Scroll this page as it is.. Just download the IPN class file and read below. Else it wont looks nice. I tried my level best to explain important code lines. You can use that button for getting donation or selling some products. Here [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fsecureslash.com%2Fphp-scripting%2Fadd-paypal-button%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://secureslash.com/php-scripting/add-paypal-button/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://secureslash.com/php-scripting/add-paypal-button/"  data-text="Add Paypal Button" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://secureslash.com/php-scripting/add-paypal-button/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://secureslash.com/php-scripting/add-paypal-button/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>You can add Paypal button in your website easily.</p>
<p><strong>DO NOT Scroll this page as it is.. Just download the IPN class file and read below. Else it wont looks nice.<br />
</strong><br />
<strong>I tried my level best to explain important code lines.</strong></p>
<p>You can use that button for getting donation or selling some products. Here is one Paypal IPN class in PHP. It is absolutely easy to setup and use.</p>
<p>Download the compressed file and extract it in your document  root.<br />
<a href="http://secureslash.com/paypal-ipn-class-1.10.rar">download and use the Paypal IPN class</a><br />
<!--adsense--><br />
And you have to edit some lines in paypal.php<br />
at line 37<br />
<span class="code">switch ($_GET['action']) {</span></p>
<p>case  &#8216;process&#8217;:      // Process and order&#8230;      // There should  be no output at this point.  To process  the POST data,<br />
// the  submit_paypal_post() function will output all the HTML tags which<br />
// contains a  FORM which is submited instantaneously using the BODY onload<br />
//  attribute.  In other words, don&#8217;t echo or  printf anything when you&#8217;re<br />
// going to be  calling the submit_paypal_post() function.</p>
<p>// This is where  you would have your form validation  and  all that jazz.<br />
// You would  take your POST vars and load them into the class like below,<br />
// only using  the POST values instead of constant string expressions.</p>
<p>// For example,  after ensureing all the POST variables from your custom<br />
// order form  are valid, you might have:<br />
//<br />
//  $p-&gt;add_field(&#8216;first_name&#8217;, $_POST['first_name']);<br />
//  $p-&gt;add_field(&#8216;last_name&#8217;, $_POST['last_name']);</p>
<p><span class="code">$p-&gt;add_field(&#8216;business&#8217;, &#8216;YOUR PAYPAL (OR SANDBOX) EMAIL ADDRESS  HERE!&#8217;);<br />
$p-&gt;add_field(&#8216;return&#8217;, $this_script.&#8217;?action=success&#8217;);<br />
$p-&gt;add_field(&#8216;cancel_return&#8217;, $this_script.&#8217;?action=cancel&#8217;);<br />
$p-&gt;add_field(&#8216;notify_url&#8217;, $this_script.&#8217;?action=ipn&#8217;);<br />
$p-&gt;add_field(&#8216;item_name&#8217;, &#8216;Paypal Test Transaction&#8217;);<br />
$p-&gt;add_field(&#8216;amount&#8217;, &#8217;1.99&#8242;);</span></p>
<p><span class="code">       $p-&gt;submit_paypal_post(); // submit the fields to paypal</span><br />
//$p-&gt;dump_fields();      //  for debugging, output a table of all the fields<br />
break;</p>
<p><span class="code">case  &#8216;success&#8217;:  </span>    // Order was  successful&#8230;</p>
<p>// This is where  you would probably want to thank the user for their order<br />
// or what have  you.  The order information at this point  is in POST<br />
//  variables.  However, you don&#8217;t want to  &#8220;process&#8221; the order until you<br />
// get  validation from the IPN.  That&#8217;s where  you would have the code to<br />
// email an  admin, update the database with payment status, activate a<br />
// membership,  etc.</p>
<p>echo &#8220;&lt;html&gt;&lt;head&gt;&lt;title&gt;Success&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;h3&gt;Thank you for your order.&lt;/h3&gt;&#8221;;<br />
foreach ($_POST  as $key =&gt; $value) { echo &#8220;$key: $value&lt;br&gt;&#8221;; }<br />
echo  &#8220;&lt;/body&gt;&lt;/html&gt;&#8221;;</p>
<p>// You could  also simply re-direct them to another page, or your own<br />
// order status page which presents the user  with the status of their<br />
// order based  on a database (which can be modified with the IPN code<br />
// below).</p>
<p>break;</p>
<p><span class="code">case &#8216;cancel&#8217;:  </span>     // Order was canceled&#8230;</p>
<p>// The order was  canceled before being completed.</p>
<p>echo &#8220;&lt;html&gt;&lt;head&gt;&lt;title&gt;Canceled&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;h3&gt;The order was canceled.&lt;/h3&gt;&#8221;;<br />
echo  &#8220;&lt;/body&gt;&lt;/html&gt;&#8221;;</p>
<p>break;</p>
<p><span class="code">case &#8216;ipn&#8217;: </span>         // Paypal is calling page for IPN  validation&#8230;</p>
<p>// It&#8217;s  important to remember that paypal calling this script.  There<br />
// is no output  here.  This is where you validate the IPN  data and if it&#8217;s<br />
// valid, update  your database to signify that the user has payed.  If<br />
// you try and  use an echo or printf function here it&#8217;s not going to do you<br />
// a bit of  good.  This is on the  &#8220;backend&#8221;.  That is why, by  default, the<br />
// class logs  all IPN data to a text file.</p>
<p>if  ($p-&gt;validate_ipn()) {</p>
<p>// Payment  has been recieved and IPN is verified.   This is where you<br />
// update  your database to activate or process the order, or setup<br />
// the  database with the user&#8217;s order details, email an administrator,<br />
// etc.  You can access a slew of information via the  ipn_data() array.</p>
<p>// Check the  paypal documentation for specifics on what information<br />
// is  available in the IPN POST variables.   Basically, all the POST vars<br />
// which paypal  sends, which we send back for validation, are now stored<br />
// in the  ipn_data() array.</p>
<p>// For this  example, we&#8217;ll just email ourselves ALL the data.<br />
$subject =  &#8216;Instant Payment Notification &#8211; Recieved Payment&#8217;;<br />
$to = &#8216;YOUR  EMAIL ADDRESS HERE&#8217;;    //  your email<br />
$body =  &#8220;An instant payment notification was  successfully recieved\n&#8221;;<br />
$body .=  &#8220;from &#8220;.$p-&gt;ipn_data['payer_email'].&#8221; on  &#8220;.date(&#8216;m/d/Y&#8217;);<br />
$body .=  &#8221; at &#8220;.date(&#8216;g:i A&#8217;).&#8221;\n\nDetails:\n&#8221;;</p>
<p>foreach  ($p-&gt;ipn_data as $key =&gt; $value) { $body .= &#8220;\n$key: $value&#8221;; }<br />
mail($to,  $subject, $body);<br />
}<br />
break;<br />
}</p>
<p>Save paypal.php</p>
<p>And use the below code to display paypal button image.</p>
<p><span class="code">&lt;form action=&#8221;paypal.php&#8221;&gt;<br />
&lt;input type=&#8221;image&#8221; src=&#8221;https://www.paypal.com/en_US/i/logo/paypal_logo.gif&#8221; border=&#8221;0&#8243; name=&#8221;submit&#8221; alt=&#8221;Make payments with PayPal &#8211; it&#8217;s fast, free and secure!&#8221;&gt;<br />
&lt;/form&gt;</span><br />
action=&#8221;paypal/paypal.php&#8221; change it based on your  directory structure.</p>
]]></content:encoded>
			<wfw:commentRss>http://secureslash.com/php-scripting/add-paypal-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logging Website Visitor Information</title>
		<link>http://secureslash.com/php-scripting/site-visitors-logging/</link>
		<comments>http://secureslash.com/php-scripting/site-visitors-logging/#comments</comments>
		<pubDate>Thu, 12 Apr 2007 14:24:55 +0000</pubDate>
		<dc:creator>KarthiKeyan</dc:creator>
				<category><![CDATA[PHP Scripting]]></category>
		<category><![CDATA[Web Administration]]></category>

		<guid isPermaLink="false">http://secureslash.com/php-scripting/site-visitors-logging/</guid>
		<description><![CDATA[Tweet Every one needs to promote their website. So we takes care on the content, designing ,etcâ€¦ after launching our site we will start getting more hits everyday. But we have to trace all the hits. We must log the visitors ip address and referrer address alltime. Because someone may try to attack your server [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fsecureslash.com%2Fphp-scripting%2Fsite-visitors-logging%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://secureslash.com/php-scripting/site-visitors-logging/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://secureslash.com/php-scripting/site-visitors-logging/"  data-text="Logging Website Visitor Information" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://secureslash.com/php-scripting/site-visitors-logging/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://secureslash.com/php-scripting/site-visitors-logging/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p> Every one needs to promote their website. So we takes care on the content, designing ,etcâ€¦ after launching our site we will start getting more hits everyday. But we have to trace all the hits. We must log the visitors ip address and referrer address alltime. Because someone may try to attack your server based on url. Just log the details everytime. It will be fine for you.<br />
<!--adsense--><br />
<strong>Step 1:</strong><br />
Include the below code in your footer.php or in footer or  header area of all of your pages.</p>
<p class="code">$remote = $_SERVER['REMOTE_ADDR'];<br />
$remote .= &#8220;&#8211;&#8221;;<br />
$remote .= $_SERVER['HTTP_REFERER'];<br />
$date = date(&#8220;d-n-Y&#8221;);<br />
$remote .= &#8220;&#8211; &#8220;;<br />
$remote .= $date;<br />
$remote .= &#8220;\r\n&#8221;;<br />
$filename = &#8216;home.txt&#8217;;<br />
if (is_writable($filename))<br />
{<br />
// In our example we&#8217;re opening $filename in append mode.<br />
// The file pointer is at the bottom of the file hence<br />
// that&#8217;s where $somecontent will go when we fwrite() it.<br />
if (!$handle = fopen($filename, &#8216;a&#8217;))<br />
{<br />
//   echo &#8220;Cannot open file ($filename)&#8221;;<br />
exit;<br />
}    // Write $somecontent to our opened file.<br />
if (fwrite($handle, $remote) === FALSE)<br />
{<br />
// echo &#8220;Cannot write to file ($filename)&#8221;;<br />
exit;<br />
}<br />
//echo &#8220;Success, wrote  ($remote) to file ($filename)&#8221;;<br />
fclose($handle);}</p>
<p>else<br />
{<br />
//echo &#8220;The  file $filename is not writable&#8221;;<br />
}</p>
<p>If you like to see the scriptâ€™s status then just remove the  comment lines.<br />
<strong>Step 2:</strong><br />
Create a text file named home.txt and chmod it to 0777</p>
<p>We are just writing information in to a file using php. Just do the above two steps and start logging your visitors.</p>
]]></content:encoded>
			<wfw:commentRss>http://secureslash.com/php-scripting/site-visitors-logging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Login Script 2</title>
		<link>http://secureslash.com/php-scripting/php-login-script-2/</link>
		<comments>http://secureslash.com/php-scripting/php-login-script-2/#comments</comments>
		<pubDate>Thu, 12 Apr 2007 14:22:42 +0000</pubDate>
		<dc:creator>KarthiKeyan</dc:creator>
				<category><![CDATA[PHP Scripting]]></category>
		<category><![CDATA[Web Administration]]></category>

		<guid isPermaLink="false">http://secureslash.com/php-scripting/php-login-script-2/</guid>
		<description><![CDATA[Tweet Form Design: &#60;form id=&#8221;form1&#8243; name=&#8221;form1&#8243; method=&#8221;post&#8221; action=&#8221;login.php&#8221;&#62; &#60;table width=&#8221;300&#8243; border=&#8221;0&#8243;&#62; &#60;tr&#62; &#60;td&#62;Username&#60;/td&#62; &#60;td&#62;&#60;input type=&#8221;text&#8221; name=&#8221;username_field&#8221; /&#62;&#60;/td&#62; &#60;/tr&#62; &#60;tr&#62; &#60;td&#62;Password&#60;/td&#62; &#60;td&#62;&#60;input type=&#8221;text&#8221; name=&#8221;password_field&#8221; /&#62;&#60;/td&#62; &#60;/tr&#62; &#60;tr&#62; &#60;td&#62; &#60;/td&#62; &#60;td&#62;&#60;input type=&#8221;submit&#8221; name=&#8221;login&#8221; value=&#8221;Login&#8221; /&#62;&#60;/td&#62; &#60;/tr&#62; &#60;/table&#62; &#60;/form&#62; Save it as â€œform.htmlâ€ &#60;?php session_start(); #3 include(â€˜config.phpâ€™); //Listen #1 $username = $_POST[â€˜username_fieldâ€™]; $password = $_POST[â€˜password_fieldâ€™]; if(($username == $user) [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fsecureslash.com%2Fphp-scripting%2Fphp-login-script-2%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://secureslash.com/php-scripting/php-login-script-2/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://secureslash.com/php-scripting/php-login-script-2/"  data-text="PHP Login Script 2" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://secureslash.com/php-scripting/php-login-script-2/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://secureslash.com/php-scripting/php-login-script-2/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><h5><span class="code">Form Design:</span></h5>
<p class="code">&lt;form id=&#8221;form1&#8243; name=&#8221;form1&#8243; method=&#8221;post&#8221;  action=&#8221;login.php&#8221;&gt;<br />
&lt;table width=&#8221;300&#8243; border=&#8221;0&#8243;&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Username&lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;text&#8221;  name=&#8221;username_field&#8221; /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Password&lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;text&#8221;  name=&#8221;password_field&#8221; /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;submit&#8221;  name=&#8221;login&#8221; value=&#8221;Login&#8221; /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/form&gt;</p>
<p>Save it as â€œform.htmlâ€</p>
<p class="code">&lt;?php<br />
session_start(); #3<br />
include(â€˜config.phpâ€™); //Listen #1<br />
$username = $_POST[â€˜username_fieldâ€™];<br />
$password = $_POST[â€˜password_fieldâ€™];<br />
if(($username == $user) &amp;&amp; ($password == $pass))<br />
{<br />
$hash = md5($pass); //Listen #2<br />
$_SESSION[â€˜hashâ€™] = $hash;<br />
echo(â€œWelcome $username&lt;br&gt;â€);<br />
}<br />
else<br />
echo(â€œIncorrect username/password&lt;br&gt;â€);<br />
?&gt;</p>
<p>Save it as â€œlogin.phpâ€</p>
<p>Listen #<br />
#1: We are just including one php script within this login.php.<br />
Let us say config.php looks like below:</p>
<p class="code">  &lt;?php<br />
//Configuration settings<br />
$user = â€œrobâ€;<br />
$pass=â€p123â€;<br />
?&gt;</p>
<p>#2: This is the main code in login.php<br />
<span class="code">md5();</span> is a function which generates hash code for given  value.<br />
We are assigning the hash value of $pass in to a session  variable.<br />
<!--adsense--><br />
#3:<br />
<span class="code">session_start();</span> we have to start the session in every page where ever we use session variables. It should be very first code of the script before producing any output.<br />
For example:</p>
<p class="code"> &lt;?php<br />
echo(â€œFirst lineâ€);<br />
session_start();<br />
&#8212;-<br />
&#8212;<br />
?&gt;<br />
This will produce an error. So it should be like</p>
<p class="code">  &lt;?php<br />
session_start();<br />
echo():<br />
?&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;title&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
Html codes<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
&lt;?php<br />
echo(â€œlast lineâ€);<br />
?&gt;</p>
<p>Why we need Session variables?</p>
<p>Let us say, you are going to develop an admin panel or user area. We need to allow authorized users only in some pages. So we must check his authority at any time. We cannt put form every where to get username and password from user. We are getting username and password only once from user and keeping his identity in login.php and other scripts. So we are storing the hash value of his password in a session variable and checking it in all pages. Seems confusing? Ok see this example it may help.</p>
<p class="code">&lt;?php<br />
session_start();<br />
//Account Area<br />
include(â€˜config.phpâ€™);<br />
if($_SESSION[â€˜hashâ€™] == (md5($pass)))<br />
{<br />
echo(â€œWelcome $userâ€);</p>
<p>}<br />
else<br />
{<br />
echo(â€œYou are not authorized to visit this page!â€);<br />
}                             ?&gt;<br />
Why we are checking hash instead of original password? Because there are some security problem with php register globals setting. This method is some what secured with session variables.There is a problem with this script. Can you guess? Yes this will stuck if any two of users having same password. Yes there is no chance for duplicate username. But there is many chances for duplicate passwords. So what is the solution? Yes we have to store the hash of username in a session variable and have to check it in everywhere.<br />
Like below:</p>
<p class="code"> If(($_SESSION[â€˜username_hashâ€™] == (md5($user))) &amp;&amp; ($_SESSION[â€˜password_hashâ€™]  == (md5($pass))))<br />
{<br />
}</p>
<p>Sounds good? We are just getting username and password from a config file (config.php) you can manipulate this mechanism by retrieving username/password from database tables.</p>
]]></content:encoded>
			<wfw:commentRss>http://secureslash.com/php-scripting/php-login-script-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PHP Login Script</title>
		<link>http://secureslash.com/php-scripting/php-login-script/</link>
		<comments>http://secureslash.com/php-scripting/php-login-script/#comments</comments>
		<pubDate>Thu, 12 Apr 2007 14:21:20 +0000</pubDate>
		<dc:creator>KarthiKeyan</dc:creator>
				<category><![CDATA[Opensource World]]></category>
		<category><![CDATA[PHP Scripting]]></category>
		<category><![CDATA[Web Administration]]></category>

		<guid isPermaLink="false">http://secureslash.com/php-scripting/php-login-script/</guid>
		<description><![CDATA[Tweet PHP Tutorial for people who is going to develop some real-time applications in PHP-MySQL . I am not going to say what is a variable and what is &#8220;for&#8221; loop syntax. If you want to know very basic about php then go to Zend PHP Tutorials . My tutorial is fully application based. I [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fsecureslash.com%2Fphp-scripting%2Fphp-login-script%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://secureslash.com/php-scripting/php-login-script/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://secureslash.com/php-scripting/php-login-script/"  data-text="PHP Login Script" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://secureslash.com/php-scripting/php-login-script/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://secureslash.com/php-scripting/php-login-script/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p>PHP Tutorial for people who is going to develop some real-time applications in PHP-MySQL . I am not going to say what is a variable and what is &#8220;for&#8221; loop syntax. If you want to know very basic about php then go to <a href="http://www.zend.com/php/beginners/index.php">Zend PHP Tutorials </a> . My tutorial is fully application based.</p>
<p>I assume that you know basic programming knowledge in php. Like for loop, while loop, session &amp; mysql database connectivity.<br />
<!--adsense--><br />
Ok we are just going to develop one login system now.</p>
<p>What are the steps?</p>
<ol start="1" type="1">
<li>Get       username &amp; Password from user</li>
<li>Validate       them</li>
<li>If       valid then let user to use the system</li>
<li>else       show an error message</li>
</ol>
<p>These are basic considerations.</p>
<p>We can achieve this by writing a single php file.</p>
<p><strong>1. PHP login form design</strong></p>
<p>Design notes: Use tables to show form fields in aligned manner.</p>
<p>Code for simple table with 6 cells</p>
<p class="code">&lt;table width=&#8221;300&#8243; border=&#8221;0&#8243;&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;</p>
<p>I hope you know <span class="code"> </span> for printing a blank space.  Enclose the table tags with a form tag.</p>
<p class="code">&lt;form id=&#8221;form1&#8243; name=&#8221;form1&#8243;  method=&#8221;post&#8221; action=&#8221;login.php&#8221;&gt;<br />
&lt;table  width=&#8221;300&#8243; border=&#8221;0&#8243;&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/form&gt;</p>
<p>Note: <span class="code">action = â€œlogin.phpâ€</span> login.php is current file name.  you can change its name.</p>
<p class="code">&lt;form id=&#8221;form1&#8243; name=&#8221;form1&#8243;  method=&#8221;post&#8221; action=&#8221;login.php&#8221;&gt;<br />
&lt;table  width=&#8221;300&#8243; border=&#8221;0&#8243;&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Username&lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;text&#8221; name=&#8221;username_field&#8221;  /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Password&lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;text&#8221; name=&#8221;password_field&#8221;  /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt; &lt;/td&gt;<br />
&lt;td&gt;&lt;input type=&#8221;submit&#8221; name=&#8221;login&#8221;  value=&#8221;Login&#8221; /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/form&gt;</p>
<p>Note:<span class="code"> input type=&#8221;password&#8221;</span> because Password field  will carry password characters.<br />
<!--adsense--><br />
You know these are just &lt;html&gt; tags.</p>
<p class="code">&lt;?php<br />
$username = $_POST[â€˜username_fieldâ€™];<br />
$password = $_POST[â€˜password_fieldâ€™];<br />
$user = â€œuser1â€;<br />
$pass = â€œ123456â€;<br />
If(($username == $user) &amp;&amp; ($password == $pass))<br />
Echo(â€œWelcome $username&lt;br&gt;â€);<br />
Else<br />
Echo(â€œIncorrect username/password&lt;br&gt;â€);<br />
?&gt;</p>
<p>Note: <span class="code">$_POST[â€˜username_fieldâ€™];</span> and <span class="code">$_POST[â€˜password_fieldâ€™];</span>  are POST method values. $user &amp; $pass are variables which holds the  username/password.<br />
<a href="http://secureslash.com/php-scripting/php-login-script-2/">Continue to page 2</a><br />
This is not a full login system. This is for showing how it  will be.</p>
]]></content:encoded>
			<wfw:commentRss>http://secureslash.com/php-scripting/php-login-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP for beginners</title>
		<link>http://secureslash.com/php-scripting/php-for-beginners/</link>
		<comments>http://secureslash.com/php-scripting/php-for-beginners/#comments</comments>
		<pubDate>Thu, 12 Apr 2007 14:19:02 +0000</pubDate>
		<dc:creator>KarthiKeyan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[PHP Scripting]]></category>

		<guid isPermaLink="false">http://secureslash.com/php-scripting/php-for-beginners/</guid>
		<description><![CDATA[Tweet PHP is the leading server site scripting language. Most of the websites are migrating from Cold Fusion, ASP and JSP to PHP. Because the fast, flexibility, database support and so on makes PHP best. What is PHP? PHP (PHP Hypertext Preprocessor) Personal Home Pages in earlier days. PHP cannot run like C, C++ or [...]]]></description>
			<content:encoded><![CDATA[<div class="bottomcontainerBox" style="border:1px solid #808080;background-color:#F0F4F9;">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fsecureslash.com%2Fphp-scripting%2Fphp-for-beginners%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://secureslash.com/php-scripting/php-for-beginners/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://secureslash.com/php-scripting/php-for-beginners/"  data-text="PHP for beginners" data-count="horizontal">Tweet</a>
			</div><div style="float:left; width:105px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script type="in/share" data-url="http://secureslash.com/php-scripting/php-for-beginners/" data-counter="right"></script></div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://secureslash.com/php-scripting/php-for-beginners/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div><p><strong>PHP</strong> is the leading server site scripting language. Most of the websites are migrating from Cold Fusion, ASP and JSP to PHP. Because the fast, flexibility, database support and so on makes PHP best.</p>
<h5><strong>What is PHP?</strong></h5>
<p>PHP (PHP Hypertext Preprocessor) Personal Home Pages in earlier days.<br />
<!--adsense--><br />
PHP cannot run like C, C++ or any other programming languages. PHP is a Server side scripting language. So you have to install and configure a web server with PHP. Apache is the most commonly used web server.</p>
<p>You can download and install Windows/Linux/Mac versions of PHP and Apache. But configuring PHP-Apache wonâ€™t be easy for you as a beginner. It is all about editing configuration files and moving files. It may take ages for you to configure and run a â€œHello Worldâ€ programming.<br />
Download WAMP</p>
<h5><strong>Best solution for php beginner level programmers </strong>.</h5>
<h5>WAMP Server (Windows Apache MySQL PHP)<strong><a href="http://www.wampserver.com/en/download.php">Download Wamp</a></strong></h5>
<p><strong><a href="http://lerdorf.com/veracruz.pdf">Download PHP tutorial in pdf format</a></strong></p>
<p>Just download and install it. Start your wamp server by left click on wamp icon in system tray (Place where the clock is available in Taskbar) &gt; Apache &gt; Start/Resume Service. This menu item will be disabled one WampApache is running. Ok Lets successfully installed WAMP and started Apache service.You have to understand very basic things about web programming. That is the words LocalHost, Document Root, index page,etc.<br />
Localhost: simply your computer.</p>
<p>You can see what web service is running in your computer. Just open IE (internet Explorer) or Firefox and type http://localhost in the addressbar. You will get an index page about the current localhost. We are currently installed Apache web server with WAMP. So we will get wamp homepage. You can install some other PWS (Personal Web Server) IIS (Internet Information Services) is the default web server for Windows.<br />
My First PHP Program:</p>
<p>Open a text editor.<br />
Start-&gt;Run-&gt;notepad</p>
<p class="code">&lt;?php<br />
echo(â€œHello Worldâ€);<br />
?&gt;</p>
<p>Just type the above code and save it as a php file.<br />
Where to save?<br />
You must save all of you PHP files under Root folder. Your document root may be â€œD:\wamp\www\â€ folder. So save your file under this folder.</p>
<p>File type?<br />
All PHP files should be saved with the extension (*.php) by default.<br />
Change the â€œSave as Typeâ€ list boxâ€™s value in to â€œAll Filesâ€ in â€œSave asâ€ dialogue box. And give the filename â€œfirst.phpâ€ (without double quotes) and click â€œSaveâ€ button.</p>
<p>Just type http://localhost/first.php in your favorite browser.<br />
Output should be</p>
<blockquote><p>Hello World.</p></blockquote>
<p><!--adsense--><br />
Once you got this output then your PHP presence is started with cheers!<br />
php tutorials for beginners</p>
<p>Zend.com is having absolute beginner tutorials.<br />
<a href="http://zend.com/zend/tut/">Zend PHP Tutorials</a><br />
Read all 15 parts and improve your knowledge.</p>
]]></content:encoded>
			<wfw:commentRss>http://secureslash.com/php-scripting/php-for-beginners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

