<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-22942188</id><updated>2011-12-15T10:52:27.894+08:00</updated><category term='file reference'/><category term='bitmapexporter'/><category term='disable back button'/><category term='Flash Player 10'/><category term='destroy session'/><category term='autorun.vbs'/><category term='javascript'/><category term='trick'/><category term='php country dropdown list'/><category term='disable reload battun'/><category term='manipulate history'/><title type='text'>Syntax of the day</title><subtitle type='html'>Code snippet and command</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-22942188.post-4116227150750880195</id><published>2010-08-16T14:23:00.002+08:00</published><updated>2010-08-16T14:40:20.815+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='disable reload battun'/><category scheme='http://www.blogger.com/atom/ns#' term='destroy session'/><category scheme='http://www.blogger.com/atom/ns#' term='disable back button'/><category scheme='http://www.blogger.com/atom/ns#' term='manipulate history'/><category scheme='http://www.blogger.com/atom/ns#' term='trick'/><title type='text'>Javascript Disable Functionality of  Back Button &amp; Reload or trace when the BACK/Reload button have been clicked</title><content type='html'>Some people think it cannot be done, and some says "why disabling the functionality of Back &amp;amp; Reload"... for those who really need to disable the functionality of back &amp;amp; reload button only knows why they need to disable it. For example.. most of secure banking site will disable BACK &amp;amp; RELOAD functionality.. which is when user hit BACK button or RELOAD it will destroy your session and redirect to the login page (User must use system menu for navigation in the system). For those who are intend to do such kind of things, you're at right place.&lt;br /&gt;&lt;br /&gt;The following code is to destroy user session when user hit BACK &amp;amp; RELOAD button/contextmenu (its mean, anywhere to go inside the system it must be through system menu no BACK button please) and considering the system have a user login session check on every page and html output setting cannot be cached by browser &amp;amp; proxy (in PHP normally set as session_cache_limiter('nocache')) or by sending the following header to make the page is fresh everytime:-&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;header( "Expires: Sun, 03 Aug 1980 03:00:00 GMT" );&lt;br /&gt;header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );&lt;br /&gt;header( "Cache-Control: no-cache, must-revalidate" );&lt;br /&gt;header( "Pragma: no-cache" );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;here is the javascript of mine to kill session when user hit back &amp;amp; reload:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;var historylength = history.length;&lt;br /&gt;var inithistorylength = historylength;&lt;br /&gt;function prepareKillSession(){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;window.history.forward();&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;temp = history.length;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;if(historylength == temp &amp;amp;&amp;amp; inithistorylength != temp){&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;//whatever code you want to do here... can alert or redirect to warning page&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;document.location.href = 'login.php';&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;} else{&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;historylength = temp;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;the system uses IFRAME.. and the page of the system will be loaded into the IFRAME and the javascript code to disable the BACK &amp;amp; RELOAD functionality will be put in the header of page that hold the IFRAME code&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;call the javascript function inside the IFRAME onload e.g:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt; i f r a m e &amp;nbsp;src="index.php" height="300" id="mainframe" onload="prepareKillSession();" width="400"&gt;&lt; / i f r a m e &gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Ok done.. thats all.. already tested on Mozilla,IExplorer &amp;amp; Google Chrome&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Any advice,suggestion &amp;amp; critics are welcome... it might be some other good way to do.. i dont know... you might be knew something else better&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-4116227150750880195?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/4116227150750880195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=4116227150750880195&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/4116227150750880195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/4116227150750880195'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2010/08/javascript-disable-functionality-of.html' title='Javascript Disable Functionality of  Back Button &amp; Reload or trace when the BACK/Reload button have been clicked'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-3318872617858652417</id><published>2008-12-17T09:53:00.000+08:00</published><updated>2008-12-17T10:07:11.493+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Flash Player 10'/><category scheme='http://www.blogger.com/atom/ns#' term='bitmapexporter'/><category scheme='http://www.blogger.com/atom/ns#' term='file reference'/><title type='text'>BitmapExporter Flash Player 10  File Reference Issue</title><content type='html'>I skip using the filereference object class to open the Save Dialog Box since i noticed the security enghancement in the filereference class in flash player 10.&lt;br /&gt;&lt;br /&gt;here is my trick&lt;br /&gt;&lt;br /&gt;i used the browser browser open/save dialog instead of flash command to open the dialog...i set the dontRetrieve value to true, so it will not do a retrieve task by popping up the save dialog box by filereference object.&lt;br /&gt;&lt;br /&gt;in the flash document..&lt;br /&gt;put the 'saved' listener as follows&lt;br /&gt;&lt;br /&gt;BitmapExporter.&lt;div&gt;addEventListener( "progress", this);&lt;br /&gt;BitmapExporter.&lt;wbr&gt;addEventListener( "status", this);   &lt;br /&gt;BitmapExporter.&lt;wbr&gt;addEventListener( "error", this);&lt;b style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt; BitmapExporter.&lt;wbr&gt;addEventListener("saved", this);&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;and  this is the listener function&lt;br /&gt;&lt;br /&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;function saved(evt:Object):Void {&lt;br /&gt;    getURL(evt.url + "&amp;amp;delete=1", "_blank");&lt;br /&gt;}&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;i set the dontRetrieve value to true&lt;br /&gt;&lt;br /&gt;BitmapExporter.saveBitmap( bitmap:BitmapData, filename:String, [mode:String], [lossBits:Number], [jpegQuality:Number], [dontRetrieve:Boolean] );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style="color: rgb(255, 0, 0);"&gt;BitmapExporter.saveBitmap(&lt;wbr&gt;snapshot, "Recommendation_Sheet.jpg", "default", 0,70,true);&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;By setting it to TRUE, it will not use the FileReference() to open the dialog window....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then in the BitmapExporter.php add the following line&lt;br /&gt;&lt;br /&gt;header('Content-Disposition: attachment; filename="myfilename.'.$&lt;wbr&gt;format.'"');&lt;br /&gt;&lt;br /&gt;see my code below where i put the line&lt;br /&gt;&lt;br /&gt;------------------------------&lt;wbr&gt;----------&lt;br /&gt;&lt;br /&gt;case "download":&lt;br /&gt;            $file = $RELATIVE_SAVEPATH.basename($_&lt;wbr&gt;GET["name"]);&lt;br /&gt;            if (isset($_GET["delete"]))&lt;br /&gt;            {&lt;br /&gt;                $deleteFile = ($_GET["delete"] == "1");&lt;br /&gt;             }&lt;br /&gt;            if (file_exists($file))&lt;br /&gt;            {&lt;br /&gt;                $_format = explode(  ".", $file);&lt;br /&gt;                $format  = strtolower( $_format[1] );&lt;br /&gt;                   &lt;br /&gt;                switch ( $format )&lt;br /&gt;                 {&lt;br /&gt;                    case "png":&lt;br /&gt;                        header ("Content-type: image/png");&lt;br /&gt;                        break;&lt;br /&gt;                       &lt;br /&gt;                    case "jpg":&lt;br /&gt;                     case "jpeg":&lt;br /&gt;                        header ("Content-type: image/jpeg");&lt;br /&gt;                        break;&lt;br /&gt;                       &lt;br /&gt;                    case "bmp":&lt;br /&gt;                         header ("Content-type: image/bmp");&lt;br /&gt;                        break;&lt;br /&gt;                       &lt;br /&gt;                    default:&lt;br /&gt;                        if ($LOGGING) error_log("Unknown filetype: ".$format, 3, "be_log" );&lt;br /&gt;                         exit();&lt;br /&gt;                        break;&lt;br /&gt;                }&lt;br /&gt;               &lt;b style="color: rgb(255, 0, 0);"&gt; header('Content-Disposition: attachment; filename="Recommendation_&lt;wbr&gt;Sheet.'.$format.'"');&lt;/b&gt;&lt;br /&gt;                 header("Content-Length: ".(string)(filesize($file)));&lt;br /&gt;            &lt;br /&gt;                readfile( $file );&lt;br /&gt;                if ($deleteFile) while(!unlink( $file )); &lt;br /&gt;            } else {&lt;br /&gt;                 if ($LOGGING) error_log($file." does not exist", 3, "be_log" );&lt;br /&gt;                exit();&lt;br /&gt;            }&lt;br /&gt;           &lt;br /&gt;            cleanUpTempFolder();&lt;br /&gt;        break;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-3318872617858652417?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/3318872617858652417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=3318872617858652417&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/3318872617858652417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/3318872617858652417'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2008/12/bitmapexporter-flash-player-10-file.html' title='BitmapExporter Flash Player 10  File Reference Issue'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-8730139508882708713</id><published>2007-08-01T17:15:00.000+08:00</published><updated>2007-08-01T17:16:15.122+08:00</updated><title type='text'>How to bypass WPA (Windows Activation) on Windows XP</title><content type='html'>How to bypass WPA (Windows Activation) on Windows XP&lt;br /&gt;Tested on Windows XP Professional SP2 and Windows Server 2003 R2.&lt;br /&gt;&lt;br /&gt;First, click "Run..." on your start menu, type "regedit" and press enter.&lt;br /&gt;The Registry Editor opens up, and you are presented with a long list of keys on the left.&lt;br /&gt;Browse through the list to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WPAEvents.&lt;br /&gt;(If you can't find this key, you're screwed!)&lt;br /&gt;On the right, you should see a stringz value named OOBETimer.&lt;br /&gt;This is the activation stuff. If you change it, Windows will change it back within a few seconds.&lt;br /&gt;Whatever its value is, change it to FF D5 71 D6 8B 6A 8D 6F D5 33 93 FD.&lt;br /&gt;(At first I thought this was different for each machine/serial number, but it's always the same if windows is activated...LOL)&lt;br /&gt;After you've changed it, right-click WPAEvents and choose "Permissions..."&lt;br /&gt;A little window opens up with a list of user names. Click SYSTEM, and in the list below ("Permissions for SYSTEM") check every box under "Deny". Click OK to own windows. You don't even have to reboot lol.&lt;br /&gt;If you're too slow windows might change it back, so just hit F5 to refresh and make sure it got saved.&lt;br /&gt;If not, just try again. Microsoft owns for making it so easy to hack their software.&lt;br /&gt;So, just keep on enjoying an activated version of windows. swapnil_009 over and out!&lt;br /&gt;&lt;br /&gt;The problem most of you are probably having is when you get to the "Permissions" section, so i expand on this tricky area.&lt;br /&gt;&lt;br /&gt;Under "Permissions..." for WPAEvents, Go into the Advanced settings.&lt;br /&gt;&lt;br /&gt;UNCHECK "Inhereit from parent the permission entries that apply to child objects. Include these with entries explicitly defined here"&lt;br /&gt;&lt;br /&gt;When prompted what course of action to take from here, click "COPY"&lt;br /&gt;&lt;br /&gt;From there, Highlight the SYSTEM line, and click edit.&lt;br /&gt;&lt;br /&gt;Deny all options, apply, and run a free copy of windows.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-8730139508882708713?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/8730139508882708713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=8730139508882708713&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/8730139508882708713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/8730139508882708713'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2007/08/how-to-bypass-wpa-windows-activation-on.html' title='How to bypass WPA (Windows Activation) on Windows XP'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-4821815024425979969</id><published>2007-05-17T11:55:00.000+08:00</published><updated>2007-05-17T11:56:37.632+08:00</updated><title type='text'>Change oracle data type</title><content type='html'>Run through the following steps, substituting your table and field names, and the required datatype.&lt;br /&gt;&lt;br /&gt;-- Create a new temporary holding field with the target datatype&lt;br /&gt;&lt;br /&gt;ALTER TABLE table_name&lt;br /&gt;ADD     temporary_field VARCHAR2(100) NULL;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Move the data to the new field and cast to the new datatype accordingly&lt;br /&gt;&lt;br /&gt;UPDATE table_name&lt;br /&gt;SET     temporary_field=TO_CHAR(original_field);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- If the original_field has dependent constraints, they&lt;br /&gt;&lt;br /&gt;-- must be dropped now.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- If the original_field is the primary key&lt;br /&gt;-- Drop the primary key constraint&lt;br /&gt;&lt;br /&gt;ALTER table table_name&lt;br /&gt;DROP    PRIMARY KEY;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- If the original field cannot be null&lt;br /&gt;-- Update the not null constraint for the original field&lt;br /&gt;&lt;br /&gt;ALTER TABLE table_name&lt;br /&gt;MODIFY  original_field NULL;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Delete everything in the original field&lt;br /&gt;&lt;br /&gt;UPDATE table_name&lt;br /&gt;SET     original_field=NULL;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Modify the datatype of the original field&lt;br /&gt;&lt;br /&gt;ALTER TABLE table_name&lt;br /&gt;MODIFY  original_field VARCHAR2(100);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Move the data back to the original field&lt;br /&gt;&lt;br /&gt;UPDATE  table_name&lt;br /&gt;SET     original_field=temporary_field;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Add the not null constraint back if necessary&lt;br /&gt;&lt;br /&gt;ALTER TABLE table_name&lt;br /&gt;MODIFY  original_field NOT NULL;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Add the primary key back if necessary&lt;br /&gt;ALTER TABLE table_name&lt;br /&gt;ADD PRIMARY KEY (original_field);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Drop the temporary holding field&lt;br /&gt;&lt;br /&gt;ALTER TABLE table_name&lt;br /&gt;DROP COLUMN temporary_field;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-4821815024425979969?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/4821815024425979969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=4821815024425979969&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/4821815024425979969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/4821815024425979969'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2007/05/change-oracle-data-type.html' title='Change oracle data type'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-1449055975808220396</id><published>2007-05-15T10:09:00.000+08:00</published><updated>2007-05-15T10:18:39.207+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php country dropdown list'/><title type='text'>PHP: My Country Dropdown List</title><content type='html'>&lt;style type="text/css"&gt;&lt;br /&gt;&lt;!--&lt;br /&gt;.style1 {color: #0000FF}&lt;br /&gt;.style3 {color: #FF0000}&lt;br /&gt;.style4 {color: #006600}&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;span class="style1"&gt;function&lt;/span&gt; ComboCountry($selected &lt;span class="style1"&gt;=&lt;/span&gt; &lt;span class="style3"&gt;0&lt;/span&gt;){&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$countries = &lt;span class="style3"&gt;&amp;quot;[Please Select]:Afghanistan:Albania:Algeria:American Samoa:Andorra:Angola:Anguilla:Antarctica:Antigua and Barbuda:Argentina:Armenia:Aruba:Ascension Island:Australia:Austria:Azerbaijan:Bahamas:Bahrain:Bangladesh:Barbados:Belarus:Belgium:Belize:Benin:Bermuda:Bhutan:Bolivia:Bosnia and Herzegovina:Botswana:Bouvet Island:Brazil:British Indian Ocean Territory:Brunei:Bulgaria:Burkina Faso:Burundi:Cambodia:Cameroon:Canada:Cape Verde:Cayman Islands:Central African Republic:Chad:Chile:China:Christmas Island:Cocos (Keeling) Islands:Colombia:Comoros:Congo:Congo (DRC):Cook Islands:Costa Rica:C&amp;ocirc;te d'Ivoire:Croatia:Cuba:Cyprus:Czech Republic:Denmark:Djibouti:Dominica:Dominican Republic:Ecuador:Egypt:El Salvador:Equatorial Guinea:Eritrea:Estonia:Ethiopia:Falkland Islands (Islas Malvinas):Faroe Islands:Fiji Islands:Finland:France:French Guiana:French Polynesia:French Southern and Antarctic Lands:Gabon:Gambia, The:Georgia:Germany:Ghana:Gibraltar:Greece:Greenland:Grenada:Guadeloupe:Guam:Guatemala:Guernsey:Guinea:Guinea-Bissau:Guyana:Haiti:Heard Island and McDonald Islands:Honduras:Hong Kong SAR:Hungary:Iceland:India:Indonesia:Iran:Iraq:Ireland:Isle of Man:Israel:Italy:Jamaica:Japan:Jersey:Jordan:Kazakhstan:Kenya:Kiribati:Korea:Kuwait:Kyrgyzstan:Laos:Latvia:Lebanon:Lesotho:Liberia:Libya:Liechtenstein:Lithuania:Luxembourg:Macao SAR:Macedonia, Former Yugoslav Republic of:Madagascar:Malawi:Malaysia:Maldives:Mali:Malta:Marshall Islands:Martinique:Mauritania:Mauritius:Mayotte:Mexico:Micronesia:Moldova:Monaco:Mongolia:Montserrat:Morocco:Mozambique:Myanmar:Namibia:Nauru:Nepal:Netherlands:Netherlands Antilles:New Caledonia:New Zealand:Nicaragua:Niger:Nigeria:Niue:Norfolk Island:North Korea:Northern Mariana Islands:Norway:Oman:Pakistan:Palau:Palestinian Authority:Panama:Papua New Guinea:Paraguay:Peru:Philippines:Pitcairn Islands:Poland:Portugal:Puerto Rico:Qatar:Reunion:Romania:Russia:Rwanda:Samoa:San Marino:S&amp;atilde;o Tom&amp;eacute; and Pr&amp;iacute;ncipe:Saudi Arabia:Senegal:Serbia, Montenegro:Seychelles:Sierra Leone:Singapore:Slovakia:Slovenia:Solomon Islands:Somalia:South Africa:South Georgia and the South Sandwich Islands:Spain:Sri Lanka:St. Helena:St. Kitts and Nevis:St. Lucia:St. Pierre and Miquelon:St. Vincent and the Grenadines:Sudan:Suriname:Svalbard and Jan Mayen:Swaziland:Sweden:Switzerland:Syria:Taiwan:Tajikistan:Tanzania:Thailand:Timor-Leste:Togo:Tokelau:Tonga:Trinidad and Tobago:Tristan da Cunha:Tunisia:Turkey:Turkmenistan:Turks and Caicos Islands:Tuvalu:Uganda:Ukraine:United Arab Emirates:United Kingdom:United States:United States Minor Outlying Islands:Uruguay:Uzbekistan:Vanuatu:Vatican City:Venezuela:Vietnam:Virgin Islands:Virgin Islands, British:Wallis and Futuna:Yemen:Zambia:Zimbabwe&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$arr = &lt;span class="style1"&gt;explode&lt;/span&gt;(&lt;span class="style3"&gt;&amp;quot;:&amp;quot;&lt;/span&gt;,$countries);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="style1"&gt;echo&lt;/span&gt; &lt;span class="style3"&gt;&amp;quot;&amp;lt;select name=\&amp;quot;Country\&amp;quot; id=\&amp;quot;Country\&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span class="style4"&gt;for&lt;/span&gt;($a&lt;span class="style1"&gt;=&lt;/span&gt;&lt;span class="style3"&gt;0&lt;/span&gt;;$a&amp;lt;&lt;span class="style1"&gt;count&lt;/span&gt;($arr);$a&lt;span class="style1"&gt;++&lt;/span&gt;){&lt;br /&gt;&lt;br /&gt;&lt;span class="style1"&gt;echo&lt;/span&gt; &lt;span class="style3"&gt;&amp;quot;&amp;lt;option value=\&amp;quot;&amp;quot;.$a.&amp;quot;\&amp;quot; &amp;quot;&lt;/span&gt;; &lt;br /&gt;&lt;br /&gt;&lt;span class="style4"&gt;if&lt;/span&gt;($selected&lt;span class="style1"&gt; == &lt;/span&gt;$a){&lt;br /&gt;&lt;br /&gt;&lt;span class="style1"&gt;echo&lt;/span&gt; &lt;span class="style3"&gt;&amp;quot;selected&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;&lt;span class="style1"&gt;echo&lt;/span&gt; &lt;span class="style3"&gt;&amp;quot;&amp;gt;&amp;quot;.$arr[$a].&amp;quot;&amp;lt;/option&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="style1"&gt;echo&lt;/span&gt; &lt;span class="style3"&gt;&amp;quot;&amp;lt;/select&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-1449055975808220396?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/1449055975808220396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=1449055975808220396&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/1449055975808220396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/1449055975808220396'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2007/05/php-my-country-dropdown-list.html' title='PHP: My Country Dropdown List'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-6371941884195285299</id><published>2007-05-14T10:04:00.000+08:00</published><updated>2007-05-14T10:06:45.827+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='autorun.vbs'/><title type='text'>Unable to Open Hard or USB Flash Drive with Windows Script Host Cannot Find Script File autorun.vbs Error</title><content type='html'>In some situation especially when anti-virus program has cleaned, healed, disinfected or removed a worm, trojan horse or virus from computer, there may be error happening whenever users try to open or access the drive by double clicking on the disk drive icon in Explorer or My Computer window to try to enter the drive’s folder. The problem or symptom happens in hard disk drive, portable hard disk drive or USB flash drive, and Windows will prompt a dialog box with the following message:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Windows Script Host&lt;br /&gt;&lt;br /&gt;Can not find script file autorun.vbs. &lt;br /&gt;&lt;br /&gt;Sometimes you will be asked to debug the VBScript with error code of 800A041F - Unexpected ‘Next’.&lt;br /&gt;&lt;br /&gt;or &lt;br /&gt;&lt;br /&gt;Choose the program you want to use to open this file with: &lt;br /&gt;&lt;br /&gt;In this case, the “Always use the selected program to open this kind of file” option is grayed out.&lt;br /&gt;&lt;br /&gt;The symptom occurs because when autorun.vbs is created by trojan horse or virus. The virus normally loads autorun.inf file to root folder of all hard drive or USB drive, and then execute autorun.bat file which contains script to apply and merge autorun.reg into the registry, with possible change to the following registry key to ensure that virus is loaded when system starts:&lt;br /&gt;&lt;br /&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]&lt;br /&gt;Userinit=userinit.exe,autorun.exe&lt;br /&gt;&lt;br /&gt;Finally, autorun.bat will call wscript.exe to run autorun.vbs.&lt;br /&gt;&lt;br /&gt;When antivirus or security software detected the autorun.vbs file as infected, the file will be deleted or removed or quarantined. However, other files (autorun.*） and registry value still referring to autorun.vbs, and this document no longer exists, hence the error when users double click to open a drive folder.&lt;br /&gt;&lt;br /&gt;To correct and solve this error, follow this steps:&lt;br /&gt;&lt;br /&gt;Run Task Manager (Ctrl-Alt-Del or right click on Taskbar) &lt;br /&gt;Stop wscript.exe process if available by highlighting the process name and clicking End Process. &lt;br /&gt;Then terminate explorer.exe process. &lt;br /&gt;In Task Manager, click on File -&gt; New Task (Run…). &lt;br /&gt;Type “cmd” (without quotes) into the Open text box and click OK. &lt;br /&gt;Type the following command one by one followed by hitting Enter key: &lt;br /&gt;del c:\autorun.* /f /s /q /a&lt;br /&gt;del d:\autorun.* /f /s /q /a&lt;br /&gt;del e:\autorun.* /f /s /q /a&lt;br /&gt;&lt;br /&gt;c, d, e each represents drive letters on Windows system. If there are more drives or partitions available, continue to command by altering to other drive letter. Note that you must also clean the autorun files from USB flash drive or portable hard disk as the external drive may also be infected. &lt;br /&gt;&lt;br /&gt;In Task Manager, click on File -&gt; New Task (Run…). &lt;br /&gt;Type “regedit” (without quotes) into the Open text box and click OK. &lt;br /&gt;Navigate to the following registry key: &lt;br /&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon&lt;br /&gt;&lt;br /&gt;Check if the value name and value data for the key is correct (the value data of userint.exe include the path which may be different than C drive, which is also valid, note also the comma which is also needed): &lt;br /&gt;“Userinit”=”C:\WINDOWS\system32\userinit.exe,”&lt;br /&gt;&lt;br /&gt;If the value is incorrent, modify it to the valid value data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-6371941884195285299?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/6371941884195285299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=6371941884195285299&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/6371941884195285299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/6371941884195285299'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2007/05/unable-to-open-hard-or-usb-flash-drive.html' title='Unable to Open Hard or USB Flash Drive with Windows Script Host Cannot Find Script File autorun.vbs Error'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-116558355243306626</id><published>2006-12-08T21:09:00.000+08:00</published><updated>2006-12-08T21:12:32.830+08:00</updated><title type='text'>Filter Input; Only Alphnumeric</title><content type='html'>if (!ctype_alnum($input)){&lt;br /&gt;    //Invalid input&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//return true if $input = "abcdeFg123DDD"&lt;br /&gt;&lt;br /&gt;//return false if $input = "#a!bcdeFg123DDD";&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-116558355243306626?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/116558355243306626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=116558355243306626&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/116558355243306626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/116558355243306626'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/12/filter-input-only-alphnumeric.html' title='Filter Input; Only Alphnumeric'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-115588398211537130</id><published>2006-08-18T14:48:00.000+08:00</published><updated>2006-08-18T14:53:17.303+08:00</updated><title type='text'>SIMPLE LAMP Configuration</title><content type='html'>INSTALL APACHE 1.3.33&lt;br /&gt;---------------------&lt;br /&gt;&lt;br /&gt;cd /&lt;source distribution&gt;&lt;br /&gt;./configure --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;INSTALL MYSQL 4.1.21&lt;br /&gt;--------------------&lt;br /&gt;&lt;br /&gt;cd /&lt;source distribution&gt;&lt;br /&gt;./configure --prefix=/database/mysql&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;cp support-files/my-medium.cnf /etc/my.cnf&lt;br /&gt;cd /usr/local/mysql&lt;br /&gt;bin/mysql_install_db --user=mysql&lt;br /&gt;chown -R root  .&lt;br /&gt;chown -R mysql var&lt;br /&gt;chgrp -R mysql .&lt;br /&gt;&lt;br /&gt;#vi /etc/ld.so.conf&lt;br /&gt;And we add the following line;&lt;br /&gt;/usr/local/mysql/lib/mysql&lt;br /&gt;&lt;br /&gt;ldconfig&lt;br /&gt;bin/mysqld_safe --user=mysql &amp;&lt;br /&gt;&lt;br /&gt;bin/mysqladmin -u root password rootpass&lt;br /&gt;&lt;br /&gt;INSTALL PHP 4.3.10&lt;br /&gt;------------------&lt;br /&gt;&lt;br /&gt;cd /&lt;source distribution&gt;&lt;br /&gt;./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/database/mysql --enable-track-vars&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;make clean&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;cp php.ini-recommended /usr/local/php/lib/php.ini&lt;br /&gt;&lt;br /&gt;under php.ini&lt;br /&gt;doc_root= "/usr/local/apache2/htdocs/"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;STARTING APACHE &amp; MYSQL AUTOMATICALLY&lt;br /&gt;-------------------------------------&lt;br /&gt;&lt;br /&gt;cd /&lt;mysql source dir&gt;&lt;br /&gt;cp support-files/mysql.server /etc/init.d/mysql&lt;br /&gt;&lt;br /&gt;create some links in the startup folders for run levels 3 and 5.&lt;br /&gt;&lt;br /&gt;cd /etc/rc3.d&lt;br /&gt;ln -s ../init.d/mysql S85mysql&lt;br /&gt;ln -s ../init.d/mysql K85mysql&lt;br /&gt;cd /etc/rc5.d &lt;br /&gt;ln -s ../init.d/mysql S85mysql&lt;br /&gt;ln -s ../init.d/mysql K85mysql &lt;br /&gt;cd ../init.d &lt;br /&gt;chmod 755 mysql &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;cd /usr/local/apache/bin&lt;br /&gt;cp apachectl /etc/init.d/httpd&lt;br /&gt;&lt;br /&gt;cd /etc/rc3.d &lt;br /&gt;ln -s ../init.d/httpd S85httpd &lt;br /&gt;ln -s ../init.d/httpd K85httpd&lt;br /&gt;cd /etc/rc5.d&lt;br /&gt;ln -s ../init.d/httpd S85httpd&lt;br /&gt;ln -s ../init.d/httpd K85httpd&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-115588398211537130?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/115588398211537130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=115588398211537130&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115588398211537130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115588398211537130'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/08/simple-lamp-configuration.html' title='SIMPLE LAMP Configuration'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-115431965267424051</id><published>2006-07-31T12:20:00.000+08:00</published><updated>2006-07-31T12:20:55.490+08:00</updated><title type='text'>Javascript : Hide &amp; Show DIV content</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(0, 0, 153);"&gt;function&lt;/span&gt; hide_them_all() {&lt;br /&gt;       getElement("csv_options").style.display = 'none';&lt;br /&gt;       getElement("excel_options").style.display = 'none';&lt;br /&gt;       getElement("latex_options").style.display = 'none';&lt;br /&gt;       getElement("htmlexcel_options").style.display = 'none';&lt;br /&gt;       getElement("htmlword_options").style.display = 'none';&lt;br /&gt;       getElement("sql_options").style.display = 'none';&lt;br /&gt;       getElement("none_options").style.display = 'none';&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 153);"&gt;function&lt;/span&gt; show_them_all() {&lt;br /&gt;       getElement("csv_options").style.display = 'block';&lt;br /&gt;       getElement("excel_options").style.display = 'block';&lt;br /&gt;       getElement("latex_options").style.display = 'block';&lt;br /&gt;       getElement("htmlexcel_options").style.display = 'block';&lt;br /&gt;       getElement("htmlword_options").style.display = 'block';&lt;br /&gt;       getElement("sql_options").style.display = 'block';&lt;br /&gt;       getElement("none_options").style.display = 'block';&lt;br /&gt;   }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-115431965267424051?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/115431965267424051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=115431965267424051&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115431965267424051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115431965267424051'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/07/javascript-hide-show-div-content.html' title='Javascript : Hide &amp; Show DIV content'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-115392655022448812</id><published>2006-07-26T23:01:00.000+08:00</published><updated>2006-07-26T23:12:08.576+08:00</updated><title type='text'>Javascript: change table row color style</title><content type='html'>&lt;span style="font-weight: bold;"&gt;sample syntax is:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;[row object].style.backgroundColor='#d3e4f5';&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example of implementation;- Change the row color on mouseover/mouseout &amp; mousedown&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&amp;lt;tr onmouseover="mouseOverColor(this);" onmouseout="mouseOutColor(this);"&lt;br /&gt;onmousedown="clickOnColor(this);"&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Javascript function:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-weight: bold;"&gt;function&lt;/span&gt; mouseOverColor(obj){&lt;br /&gt;  if(obj.style.backgroundColor.toUpperCase() != '#FFCC99'){ &lt;br /&gt;      obj.style.backgroundColor='#CCFFCC';&lt;br /&gt;  }&lt;br /&gt;  obj.style.cursor='pointer';&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 153);"&gt;function&lt;/span&gt; mouseOutColor(obj){&lt;br /&gt;  if(obj.style.backgroundColor.toUpperCase() != "#FFCC99"){&lt;br /&gt;      obj.style.backgroundColor='#d3e4f5';&lt;br /&gt;  }&lt;br /&gt;  obj.style.cursor='normal';&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); font-weight: bold;"&gt;function&lt;/span&gt; clickOnColor(obj){&lt;br /&gt;  if(obj.style.backgroundColor.toUpperCase() == "#FFCC99"){&lt;br /&gt;      obj.style.backgroundColor='#CCFFCC';&lt;br /&gt;  } else{&lt;br /&gt;      obj.style.backgroundColor='#FFCC99';&lt;br /&gt;  }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-115392655022448812?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/115392655022448812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=115392655022448812&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115392655022448812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115392655022448812'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/07/javascript-change-table-row-color.html' title='Javascript: change table row color style'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-115331994813369111</id><published>2006-07-19T22:38:00.000+08:00</published><updated>2006-07-26T23:57:54.740+08:00</updated><title type='text'>Install Apache, MySql dan PHP (Windows)</title><content type='html'>&lt;span style="font-weight: bold;"&gt;1. Pengenalan&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Artikel ini merumuskan cara dan kaedah yang paling mudah untuk install dan konfigurasi Apache, MySql dan PHP pada pelantar sistem pengoperasian Windows. Versi perisian yang akan diterangkan di dalam artikel ini adalah seperti berikut:&lt;br /&gt;&lt;br /&gt;- Apache 1.3.33 - installer&lt;br /&gt;- MySQL 4.1.10 - installer&lt;br /&gt;- PHP 4.3.10 - binary zip package&lt;br /&gt;- Windows XP/2K&lt;br /&gt;&lt;br /&gt;Sila download perisian-perisian tersebut di laman web pengeluar:&lt;br /&gt;&lt;br /&gt;Apache - http://httpd.apache.org/download.cgi&lt;br /&gt;MySQL - http://dev.mysql.com/downloads/&lt;br /&gt;PHP - http://www.php.net/downloads.php&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Install Pelayan Web Apache&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Dengan menggunakan apache installer, anda cuma perlu mengikut arahan dan maklumat semasa proses install. Berikut adalah maklumat yang perlu diberikan semasa proses install:&lt;br /&gt;&lt;br /&gt;- Nama Domain e.g alamatdomain.com&lt;br /&gt;- Alamat web e.g www.alamatdomain.com&lt;br /&gt;- Alamat Email webmaster e.g webmaster@alamatdomain.com&lt;br /&gt;&lt;br /&gt;** Maklumat berikut boleh diubahsuai semula selepas proses install. Anda boleh meletakkan apa sahaja maklumat tiruan sekiranya maklumat yang benar bagi item-item tersebut tiada.&lt;br /&gt;&lt;br /&gt;Sila pastikan Apache Service dilarikan at system start-up sebagai Service untuk semua pengguna (user) komputer tersebut.&lt;br /&gt;&lt;br /&gt;NOTA: Sekiranya IIS Server is running, sila stopkannya terlebih dahulu.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. Install MySQL&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Install MySql dengan menggunakan MySql Installer. Dengan mengunakan wizard installer tersebut anda hanya perlu mengikut arahan dan maklumat semasa proses install.&lt;br /&gt;&lt;br /&gt;Pilih jenis Typical Install dan pastikan MySQL run sebagai service at start-up, nama service yang dicadangkan ialah &lt;span style="font-weight: bold;"&gt;MySql&lt;/span&gt;. Berikut adalah maklumat penting yang perlu ditentukan semasa proses install&lt;span style="font-weight: bold;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;- Katalaluan untuk Master User (root)&lt;br /&gt;- Tentukan samada server Mysql tersebut boleh diakses oleh anonymous&lt;br /&gt;- Tentukan samada root boleh diakses hanya dari localhost&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. Install PHP&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Unzip package yang telah didownload e.g php4-3-10.zip unzip to C:\My Document\php4-3-10&lt;br /&gt;Copy C:\My Document\php4-3-10\ ke C:\php4-3-10&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;Rename C:\php4-3-10\ kepada C:\php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Copy &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;C:\php\php.ini-dist&lt;/span&gt; ke dalam direktori &lt;span style="font-weight: bold;"&gt;C:\Windows&lt;/span&gt; atau &lt;span style="font-weight: bold;"&gt;C:\WINNT&lt;/span&gt; dan &lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;rename kepada php.ini&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Copy &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;C:\php\php4ts.dll &lt;/span&gt;ke dalam direktori &lt;span style="font-weight: bold;"&gt;C:\WINNT&lt;/span&gt; atau &lt;span style="font-weight: bold;"&gt;C:\Windows&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;Copy semua fail&lt;/span&gt; yang terdapat di dalam &lt;span style="font-weight: bold;"&gt;C:\php\dlls\&lt;/span&gt; ke dalam direktori &lt;span style="font-weight: bold;"&gt;C:\WINNT\System32\&lt;/span&gt; atau &lt;span style="font-weight: bold;"&gt;C:\Windows\System32\&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Buka fail config php &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;C:\WINNT\php.ini &lt;/span&gt;atau &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;C:\Windows\php.ini&lt;/span&gt; dan cari setting &lt;span style="font-weight: bold;"&gt;extension_dir&lt;/span&gt; dan tetapkan seperti berikut&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;extension_dir = c:/php/extensions/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4.1 Install Sebagai CGI binary&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Buka config file bagi apache C:\Program Files\Apache Group\Apache\conf\httpd.conf dan &lt;span style="font-weight: bold;"&gt;TAMBAH&lt;/span&gt; line berikut selepas line &lt;span style="font-weight: bold;"&gt;AddModule&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;ScriptAlias /php/ "c:/php/"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;AddType application/x-httpd-php .php&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Action application/x-httpd-php "/php/php.exe"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;NOTA: Install sebagai CGI akan mendedahkan server anda kepada beberapa jenis serangan penggodam. Sila baca dengan lebih lanjut berkenaan dengan PHP CGI security (www.php.net) untuk mengetahui dengan lebih lanjut bagaimana untuk mengelak serangan-serangan yang mungkin boleh dilakukan.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4.2 Install Sebagai Modul Apache&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Buka config file bagi apache C:\Program Files\Apache Group\Apache\conf\httpd.conf dan &lt;span style="font-weight: bold;"&gt;TAMBAH&lt;/span&gt; line berikut selepas line &lt;span style="font-weight: bold;"&gt;AddModule&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;LoadModule php4_module "c:/php/sapi/php4apache.dll"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;AddType application/x-httpd-php .php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SILA Restart server Apache dengan menggunakan command NET STOP APACHE kemudian diikuti dengan NET START APACHE  sekiranya anda menginstall apache sebagai Windows Service atau akses Services control panel under Administrative Tools.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. Uji Server Anda&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Cipta satu fail &lt;span style="font-weight: bold;"&gt;test.php &lt;/span&gt;dan letakkan line berikut:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;phpinfo();&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Save fail tersebut di &lt;span style="color: rgb(204, 0, 0);"&gt;C:\Program Files\Apache Group\Apache\htdocs\test.php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Buka Internet Explorer anda dan akses kepada &lt;span style="font-weight: bold;"&gt;http://localhost/test.php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sekiranya page tersebut berjaya dipaparkan.. ini bermakna konfigurasi php dan apache anda sudah berjaya.. sekiranya tidak, hubungi saya.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-115331994813369111?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/115331994813369111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=115331994813369111&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115331994813369111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115331994813369111'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/07/install-apache-mysql-dan-php-windows.html' title='Install Apache, MySql dan PHP (Windows)'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-115329286531426678</id><published>2006-07-19T15:05:00.000+08:00</published><updated>2006-07-19T15:07:49.290+08:00</updated><title type='text'>VB6 - Set Current Working Directory</title><content type='html'>&lt;span style="color: rgb(0, 153, 0);"&gt;'Declaration&lt;/span&gt;&lt;br /&gt;Private Declare Function SetCurrentDirectory Lib "kernel32" _&lt;br /&gt;Alias "SetCurrentDirectoryA" (ByVal lpPathName As String) As Long&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;'syntax to set current dir&lt;/span&gt;&lt;br /&gt;SetCurrentDirectory App.Path&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-115329286531426678?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/115329286531426678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=115329286531426678&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115329286531426678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115329286531426678'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/07/vb6-set-current-working-directory.html' title='VB6 - Set Current Working Directory'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-115318915084512142</id><published>2006-07-18T10:18:00.000+08:00</published><updated>2006-07-18T10:19:13.543+08:00</updated><title type='text'>Installing Apache, Mysql and PHP on Linux</title><content type='html'>&lt;h2&gt;Installation&lt;/h2&gt; &lt;p&gt;&lt;br /&gt;The first thing we need to do is extract the sourceballs so we can work with the files included in them. Beginning now we will be working as root, so open a terminal window, change to the directory in which you saved your downloaded files and become root by issuing the "su" command, enter the root password and you should be good to go.&lt;br /&gt;&lt;br /&gt;To extract the sourceballs type the following commands;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#tar -zxf httpd-2.0.48.tar.gz&lt;/b&gt;&lt;br /&gt;&lt;b&gt;#tar -zxf mysql-4.0.16.tar.gz &lt;/b&gt;&lt;br /&gt;&lt;b&gt;#tar -zxf php-4.3.4.tar.gz&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The commands above will extract the sourceballs into their own separate directories. Now lets move on to compiling the source into usable programs. We'll start with Apache.&lt;br /&gt;&lt;br /&gt; &lt;/p&gt; &lt;h2&gt;Compiling Apache&lt;/h2&gt; &lt;p&gt;&lt;br /&gt;Change into the directory created when you untarred the sourceball as follows;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cd httpd-2.0.48&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Follow this command by typing;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#./configure –prefix=/usr/local/apache2 –enable-mods-shared=most &lt;/b&gt; (enter)&lt;br /&gt;&lt;br /&gt;This tells Apache to install in the /usr/local/apache2 directory, and to build most of the available loadable modules. There are a ton of options with Apache, but these should work for the most part. Once the configure is done and the system returns the prompt to you, issue the following command;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#make&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This will take a few minutes, once the prompt comes back again issue the following command;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#make install&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Wait for a few minutes and viola !, Apache is installed with the exception of a few minor changes we still need to make. They are as follows..&lt;br /&gt;&lt;br /&gt;Issue the following command;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#vi /usr/local/apache2/conf/httpd&lt;wbr&gt;.conf&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Check to make sure the following line is present in the file at the bottom of the LoadModule list, if it is not there add it;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;LoadModule php4_module modules/libphp4.so&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Find the DirectoryIndex line and edit it so it looks like the following;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DirectoryIndex index.html index.html.var index.php&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Find the AddType application section and add the following line;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;AddType application/x-httpd-php .php&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Thats it, save the file and we are done with Apache. Now, on to MySQL !&lt;br /&gt;&lt;br /&gt; &lt;/p&gt; &lt;h2&gt;Compiling MySQL&lt;/h2&gt; &lt;p&gt;&lt;br /&gt;Change into the MySQL source directory as follows;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cd mysql-4.0.16&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Follow this command by typing;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#./configure –prefix=/usr/local/mysql –localstatedir=/usr/local&lt;wbr&gt;/mysql/data –disable-maintainer-mode –with-mysqld-user=mysql –enable-large-files-without&lt;wbr&gt;-debug &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Sit back and wait for a while while configure does its thing, once the system returns the prompt to you issue the following command;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#make &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Unless you have a very fast machine this will take some time, so spend time with your family, grab a beer, go for a walk, or whatever you're into. When you get back, assuming the system has returned the prompt to you issue the following command;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#make install&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Cool !, MySQL is installed, there are only a couple things left to do to get it working, first we need to create a group for MySQL as follows;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#/usr/sbin/groupadd mysql &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Then we create a user called mysql which belongs to the mysql group;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#/usr/sbin/useradd -g mysql mysql&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now we install the database files as follows;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#./scripts/mysql_install_db&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Then we make a couple minor ownership changes;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;# chown -R root:mysql /usr/local/mysql&lt;/b&gt;&lt;br /&gt;&lt;b&gt;# chown -R mysql:mysql /usr/local/mysql/data&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Last but not least, we use vi to add a line the ld.so.conf file as follows;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#vi /etc/ld.so.conf&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;And we add the following line;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/usr/local/mysql/lib/mysql&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Thats it, MySQL is installed, you can run it by issuing the following command;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#/usr/local/mysql/bin/mysqld&lt;wbr&gt;_safe –user=mysql &amp; &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;And as long as we're here we might as well set a root password for MySQL as follows;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#/usr/local/mysql/bin/mysqladmi&lt;wbr&gt;n -u root password new_password&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Where "new_password" is the password you want to use.&lt;br /&gt;&lt;br /&gt;Ok, so far so good, on to PHP !&lt;br /&gt;&lt;br /&gt; &lt;/p&gt; &lt;h2&gt;Compiling PHP&lt;/h2&gt; &lt;p&gt;&lt;br /&gt;Change into the PHP source directory as follows;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cd php-4.3.4&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Follow this command by typing;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#./configure –prefix=/usr/local/php –with-apxs2=/usr/local/apache2&lt;wbr&gt;/bin/apxs –with-mysql=/usr/local/mysql &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Once the prompt comes back to you issue the following command;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#make&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Hang out for awhile, and then yep, you guessed it, once you have the prompt back;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#make install&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Once the install finishes and you have the prompt back issue the following command;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cp php.ini-recommended /usr/local/php/lib/php.ini&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Then edit that file;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#vi /usr/local/php/lib/php.ini&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;And change the following;&lt;br /&gt;&lt;br /&gt;Find the "doc_root" section and enter the correct path for the directory which serves your web content, such as;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;doc_root= "/usr/local/apache2/htdocs/"&lt;/b&gt;&lt;br /&gt;(this is default for apache2)&lt;br /&gt;&lt;br /&gt;Then find the file_uploads section and change it to reflect the following;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;file_uploads=Off&lt;/b&gt;&lt;br /&gt;(for security reasons)&lt;br /&gt;&lt;br /&gt;Thats if for PHP, now lets see if it all works..&lt;br /&gt;&lt;br /&gt; &lt;/p&gt; &lt;h2&gt;Testing&lt;/h2&gt; &lt;p&gt;&lt;br /&gt;Assuming your MySQL process is still running from earlier, lets start Apache by issuing the following command;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#/usr/local/apache2/bin&lt;wbr&gt;/apachectl start&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This starts the Apache web server, now change into the following directory;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cd /usr/local/apache2/htdocs&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;And using vi create a file called test.php;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#vi test.php&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Add the following line to the file;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;?php phpinfo(); ?&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Save the file, then fire up your browser and point it to  &lt;b&gt;localhost/test.php&lt;/b&gt;. You should see a listing of all kinds of cool info about Apache, PHP, etc. If you do then your set !, if you don't, then take a look at your logs for Apache and MySql, and remember Google is your friend. But hopefully you do, and now you have a fully functioning setup.&lt;br /&gt;&lt;br /&gt;Ok, one last step and we'll be done, you have everything running now, but you had to start Apache and MySql manually, that's something you don't want to have to remember to do everytime you reboot your machine, so lets fix it.&lt;br /&gt;&lt;br /&gt; &lt;/p&gt; &lt;h2&gt;Starting Apache and MySQL Automatically&lt;/h2&gt;&lt;br /&gt;Lets start with MySQL, as root make your working directory that of the MySQL source directory you worked with earlier, something similar to;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cd /home/xxxx/mysql-4.0.16&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Then, copy the file mysql.server  to your /etc/init.d directory as follows;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cp support-files/mysql.server /etc/init.d/mysql&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Ok, lets create some links in the startup folders for run levels 3 and 5.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cd /etc/rc3.d&lt;/b&gt;&lt;br /&gt;&lt;b&gt; #ln -s ../init.d/mysql S85mysql&lt;/b&gt;&lt;br /&gt;&lt;b&gt;#ln -s ../init.d/mysql K85mysql&lt;/b&gt;&lt;br /&gt;&lt;b&gt;#cd /etc/rc5.d &lt;/b&gt;&lt;br /&gt;&lt;b&gt;#ln -s ../init.d/mysql S85mysql&lt;/b&gt;&lt;br /&gt;&lt;b&gt;#ln -s ../init.d/mysql K85mysql &lt;/b&gt;&lt;br /&gt;&lt;b&gt;#cd ../init.d &lt;/b&gt;&lt;br /&gt;&lt;b&gt;#chmod 755 mysql  &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Thats it for MySQL, it should start automatically now when you reboot your machine. Now lets do the same for Apache, still logged in as root, make your working directory that of the Apache binaries as follows;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cd /usr/local/apache2/bin&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Then, copy the file called &lt;b&gt;apachectl&lt;/b&gt; as follows;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cp apachectl /etc/init.d/httpd&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now, for some more links;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;#cd /etc/rc3.d &lt;/b&gt;&lt;br /&gt;&lt;b&gt;#ln -s ../init.d/httpd S85httpd  &lt;/b&gt;&lt;br /&gt;&lt;b&gt;#ln -s ../init.d/httpd K85httpd&lt;/b&gt;&lt;br /&gt;&lt;b&gt;#cd /etc/rc5.d&lt;/b&gt;&lt;br /&gt;&lt;b&gt;#ln -s ../init.d/httpd S85httpd&lt;/b&gt;&lt;br /&gt;&lt;b&gt;#ln -s ../init.d/httpd K85httpd&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;And thats it for Apache !, it should start automatically along with MySQL the next time you boot your machine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-115318915084512142?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/115318915084512142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=115318915084512142&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115318915084512142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115318915084512142'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/07/installing-apache-mysql-and-php-on.html' title='Installing Apache, Mysql and PHP on Linux'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-115318862398982562</id><published>2006-07-18T10:07:00.000+08:00</published><updated>2006-07-18T10:14:55.850+08:00</updated><title type='text'>Autorun CD in Linux</title><content type='html'>Create file named "autorun", put the following syntax (if you want to open the index.htm once the CD mounted)&lt;br /&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;mozilla file:///mnt/cdrom/index.htm &amp;amp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-115318862398982562?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/115318862398982562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=115318862398982562&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115318862398982562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115318862398982562'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/07/autorun-cd-in-linux.html' title='Autorun CD in Linux'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-115318733752601385</id><published>2006-07-18T09:11:00.000+08:00</published><updated>2006-07-18T09:57:06.260+08:00</updated><title type='text'>How to encode a message..</title><content type='html'>The following PHP user defined function is to encode and decode a string message. This is how to encode a message so that only people having the right key can easily read the message. This method called ciphers. All the earliest ciphers that we know about use simple substitutions. For example, Julius Caesar kept his messages secret by taking each letter in the message and replacing it with the one three letters further on; the letter A is replaced by D, B is replaced by E, and so on, until you get ti the letters after X. since X is 24th letter of the alphabet, you have to wrap around to the beginning of the alphabet, and X becomes A, Y becomes B, Z becomes C.&lt;br /&gt;&lt;br /&gt;In this function subsitutions scheme is not based on alphabet order but based on ascii code. Here it is..&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;function&lt;/span&gt; EncodeKey($myStr&lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt;,$inKey&lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt;){&lt;br /&gt;$error =&lt;span style="color: rgb(0, 102, 0);"&gt; false&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; if&lt;/span&gt;(&lt;span style="color: rgb(51, 51, 255);"&gt;empty&lt;/span&gt;($inKey)){&lt;br /&gt;   &lt;span style="color: rgb(255, 153, 0);"&gt; //echo "Encode key is required&lt;br /&gt;";&lt;/span&gt;&lt;br /&gt;    $error &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;true&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(&lt;span style="color: rgb(51, 51, 255);"&gt;empty&lt;/span&gt;($myStr)){&lt;br /&gt;   &lt;span style="color: rgb(255, 153, 0);"&gt; //echo "String to encode is empty";&lt;/span&gt;&lt;br /&gt;    $error &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;true&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;if&lt;/span&gt;(!$error){&lt;br /&gt;    &lt;span style="color: rgb(255, 153, 0);"&gt;//$tmpNum, $tmpChr, $tmpAsc, $newAsc, $retStr;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    $tmpNum &lt;span style="color: rgb(51, 51, 255);"&gt;= &lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;    $retStr &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; ""&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(0, 102, 0);"&gt;for&lt;/span&gt;($i&lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;;$i&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;strlen&gt;&lt;/strlen&gt;&lt;/span&gt;&lt; &lt;span style="color: rgb(51, 51, 255);"&gt;strlen&lt;/span&gt;($myStr);$i&lt;span style="color: rgb(51, 51, 255);"&gt;++&lt;/span&gt;){&lt;br /&gt;        $tmpChr &lt;span style="color: rgb(51, 51, 255);"&gt;= substr&lt;/span&gt;($myStr,$i,&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;);&lt;br /&gt;        $tmpAsc &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;ord&lt;/span&gt;($tmpChr);&lt;br /&gt;        $newAsc &lt;span style="color: rgb(51, 51, 255);"&gt;= &lt;/span&gt;$tmpAsc - &lt;span style="color: rgb(51, 51, 255);"&gt;ord&lt;/span&gt;(&lt;span style="color: rgb(51, 51, 255);"&gt;substr&lt;/span&gt;($inKey,$tmpNum,&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;));&lt;br /&gt;        &lt;span style="color: rgb(0, 102, 0);"&gt;if&lt;/span&gt;($newAsc &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;= &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;){&lt;br /&gt;            $newAsc &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;255&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; +&lt;/span&gt; $newAsc;&lt;br /&gt;        }&lt;br /&gt;   &lt;br /&gt;        $retStr &lt;span style="color: rgb(51, 51, 255);"&gt;= &lt;/span&gt;$retStr . &lt;span style="color: rgb(51, 51, 255);"&gt;chr&lt;/span&gt;($newAsc);&lt;br /&gt;        $tmpNum &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt; $tmpNum &lt;span style="color: rgb(51, 51, 255);"&gt;+  &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;;&lt;br /&gt;   &lt;br /&gt;        &lt;span style="color: rgb(0, 102, 0);"&gt;if&lt;/span&gt;($tmpNum &lt;span style="color: rgb(51, 51, 255); font-weight: bold;"&gt;&gt;= &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;strlen&lt;/span&gt;($inKey)){&lt;br /&gt;            $tmpNum &lt;span style="color: rgb(51, 51, 255);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;   &lt;span style="color: rgb(0, 102, 0);"&gt; return&lt;/span&gt; $retStr;&lt;br /&gt;&lt;br /&gt;} &lt;span style="color: rgb(0, 102, 0);"&gt;else&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: rgb(0, 102, 0);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; ""&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;function&lt;/span&gt; DecodeKey($myStr&lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt;,$inKey&lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt;){&lt;br /&gt;$error =&lt;span style="color: rgb(0, 102, 0);"&gt; false&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; if&lt;/span&gt;(&lt;span style="color: rgb(51, 51, 255);"&gt;empty&lt;/span&gt;($inKey)){&lt;br /&gt;   &lt;span style="color: rgb(255, 153, 0);"&gt; //echo "Encode key is required&lt;br /&gt;";&lt;/span&gt;&lt;br /&gt;    $error &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;true&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(&lt;span style="color: rgb(51, 51, 255);"&gt;empty&lt;/span&gt;($myStr)){&lt;br /&gt;   &lt;span style="color: rgb(255, 153, 0);"&gt; //echo "String to encode is empty";&lt;/span&gt;&lt;br /&gt;    $error &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;true&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;if&lt;/span&gt;(!$error){&lt;br /&gt;    &lt;span style="color: rgb(255, 153, 0);"&gt;//$tmpNum, $tmpChr, $tmpAsc, $newAsc, $retStr;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    $tmpNum &lt;span style="color: rgb(51, 51, 255);"&gt;= &lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;    $retStr &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; ""&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(0, 102, 0);"&gt;for&lt;/span&gt;($i&lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;;$i&lt;span style="font-weight: bold;"&gt;&lt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;strlen&gt;&lt;/strlen&gt;&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;strlen&lt;/span&gt;($myStr);$i&lt;span style="color: rgb(51, 51, 255);"&gt;++&lt;/span&gt;){&lt;br /&gt;        $tmpChr &lt;span style="color: rgb(51, 51, 255);"&gt;= substr&lt;/span&gt;($myStr,$i,&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;);&lt;br /&gt;        $tmpAsc &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;ord&lt;/span&gt;($tmpChr);&lt;br /&gt;        $newAsc &lt;span style="color: rgb(51, 51, 255);"&gt;= &lt;/span&gt;$tmpAsc + &lt;span style="color: rgb(51, 51, 255);"&gt;ord&lt;/span&gt;(&lt;span style="color: rgb(51, 51, 255);"&gt;substr&lt;/span&gt;($inKey,$tmpNum,&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;));&lt;br /&gt;        &lt;span style="color: rgb(0, 102, 0);"&gt;if&lt;/span&gt;($newAsc &lt;span style="color: rgb(51, 51, 255);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; 255&lt;/span&gt;){&lt;br /&gt;            $newAsc &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;/span&gt; $newAsc &lt;span style="color: rgb(51, 51, 255);"&gt;-&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;255&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;   &lt;br /&gt;        $retStr &lt;span style="color: rgb(51, 51, 255);"&gt;= &lt;/span&gt;$retStr . &lt;span style="color: rgb(51, 51, 255);"&gt;chr&lt;/span&gt;($newAsc);&lt;br /&gt;        $tmpNum &lt;span style="color: rgb(51, 51, 255);"&gt;=&lt;/span&gt; $tmpNum &lt;span style="color: rgb(51, 51, 255);"&gt;+  &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;;&lt;br /&gt;   &lt;br /&gt;        &lt;span style="color: rgb(0, 102, 0);"&gt;if&lt;/span&gt;($tmpNum &lt;span style="color: rgb(51, 51, 255);"&gt;&gt;= strlen&lt;/span&gt;($inKey)){&lt;br /&gt;            $tmpNum &lt;span style="color: rgb(51, 51, 255);"&gt;= &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;   &lt;span style="color: rgb(0, 102, 0);"&gt; return&lt;/span&gt; $retStr;&lt;br /&gt;&lt;br /&gt;} &lt;span style="color: rgb(0, 102, 0);"&gt;else&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: rgb(0, 102, 0);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; ""&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-115318733752601385?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/115318733752601385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=115318733752601385&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115318733752601385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/115318733752601385'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/07/how-to-encode-message.html' title='How to encode a message..'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-114311241756237675</id><published>2006-03-23T19:11:00.000+08:00</published><updated>2006-03-23T19:13:37.573+08:00</updated><title type='text'>PHP mktime()</title><content type='html'>mktime() is useful for doing date arithmetic and validation, as it will automatically calculate the correct value for out-of-range input. For example, each of the following lines produces the string "Jan-01-1998".&lt;br /&gt;&lt;br /&gt;echo date("M-d-Y", mktime(0, 0, 0, 12, 32, 1997));&lt;br /&gt;echo date("M-d-Y", mktime(0, 0, 0, 13, 1, 1997));&lt;br /&gt;echo date("M-d-Y", mktime(0, 0, 0, 1, 1, 1998));&lt;br /&gt;echo date("M-d-Y", mktime(0, 0, 0, 1, 1, 98));&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-114311241756237675?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/114311241756237675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=114311241756237675&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/114311241756237675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/114311241756237675'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/03/php-mktime.html' title='PHP mktime()'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-114248842014108918</id><published>2006-03-16T13:46:00.000+08:00</published><updated>2006-03-16T13:53:40.156+08:00</updated><title type='text'>Date function in php</title><content type='html'>Date function in php&lt;br /&gt;&lt;br /&gt;various of use for date function in php&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;&lt;?&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff9900;"&gt;// Assuming today is: March 10th, 2001, 5:16:18 pm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;$today = date(&lt;span style="color:#ff0000;"&gt;"F j, Y, g:i a"&lt;/span&gt;);&lt;/span&gt;               &lt;span style="color:#ff9900;"&gt; // March 10, 2001, 5:16 pm&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;$today = date("m.d.y");&lt;/span&gt;                        &lt;span style="color:#ff9900;"&gt;// 03.10.01&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;$today = date("j, n, Y");&lt;/span&gt;                      &lt;span style="color:#ff9900;"&gt;// 10, 3, 2001&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;$today = date("Ymd");&lt;/span&gt;                          &lt;span style="color:#ff9900;"&gt;// 20010310&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;$today = date('h-i-s, j-m-y, it is w Day z ');&lt;/span&gt;  &lt;span style="color:#ff9900;"&gt;// 05-16-17, 10-03-01, 1631 1618 6 Fripm01&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;$today = date('\i\t \i\s \t\h\e jS \d\a\y.');&lt;/span&gt;  &lt;span style="color:#ff9900;"&gt;// It is the 10th day.&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;$today = date("D M j G:i:s T Y");&lt;/span&gt;              &lt;span style="color:#ff9900;"&gt;// Sat Mar 10 15:16:08 MST 2001&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;$today = date(&lt;span style="color:#ff0000;"&gt;'H:m:s \m \i\s\ \m\o\n\t\h'&lt;/span&gt;);&lt;/span&gt;    &lt;span style="color:#ff9900;"&gt;// 17:03:17 m is month&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;$today = date(&lt;span style="color:#ff0000;"&gt;"H:i:s"&lt;/span&gt;);&lt;/span&gt;                        &lt;span style="color:#ff9900;"&gt;// 17:16:17&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;?&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-114248842014108918?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/114248842014108918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=114248842014108918&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/114248842014108918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/114248842014108918'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/03/date-function-in-php.html' title='Date function in php'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-114102971080497480</id><published>2006-02-27T16:37:00.000+08:00</published><updated>2006-02-27T16:41:50.813+08:00</updated><title type='text'>Javascript to detect current active element</title><content type='html'>&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&amp;gt;&lt;br /&gt;&lt;p&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;head&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;title&amp;gt;Untitled&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;script&amp;gt;&lt;br /&gt;&lt;br /&gt; function initPage() {&lt;br /&gt;&lt;br /&gt; setInterval('show()',500)&lt;br /&gt;&lt;br /&gt; if (document.activeElement) {&lt;br /&gt;&lt;br /&gt; return;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; document.activeElement = null; // set up global var&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; if (document.forms.length&amp;gt;0) {&lt;br /&gt;&lt;br /&gt; for (i=0;i&amp;lt;document.forms.length;i++) {&lt;br /&gt;&lt;br /&gt; for (j=0;j&amp;lt;document.forms[i].elements.length;j++) {&lt;br /&gt;&lt;br /&gt; document.forms[i].elements[j].onfocus=new Function ("document.activeElement=this;");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; if (document.links.length&amp;gt;0) {&lt;br /&gt;&lt;br /&gt; for (i=0;i&amp;lt;document.links.length;i++) {&lt;br /&gt;&lt;br /&gt; document.links[i].onfocus=new Function ("document.activeElement=this");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; function show() {&lt;br /&gt;&lt;br /&gt; if (document.activeElement &amp;amp;&amp; document.activeElement.name) document.getElementById('what').innerHTML='Active:'+document.activeElement.name&lt;br /&gt;&lt;br /&gt; else if (document.activeElement &amp;amp;amp;&amp; document.activeElement.href) document.getElementById('what').innerHTML='Active:'+document.activeElement.href&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; &amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;/head&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;body onLoad="initPage()"&amp;gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;form&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;input name="form1_elem1" type="text"&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;input name="form1_elem2" type="text"&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;a href="1.html"&amp;gt;Hello 1&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;form&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;input name="form2_elem1" type="text"&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;input name="form2_elem2" type="text"&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;a href="2.html"&amp;gt;Hello 2&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;div id="what"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;/body&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;/html&amp;gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-114102971080497480?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/114102971080497480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=114102971080497480&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/114102971080497480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/114102971080497480'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/02/javascript-to-detect-current-active.html' title='Javascript to detect current active element'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-114077466051509923</id><published>2006-02-24T17:47:00.000+08:00</published><updated>2006-02-24T17:52:46.360+08:00</updated><title type='text'>Generate unique id (PHP)</title><content type='html'>&lt;strong&gt;&lt;span style="color:#333333;"&gt;This is to generate unique id (PHP) based on current time in microseconds&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;?php&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;// no prefix&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;$token = md5(uniqid());&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff9900;"&gt;// better, difficult to guess&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;$better_token = md5(uniqid(rand(), true));&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-114077466051509923?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/114077466051509923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=114077466051509923&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/114077466051509923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/114077466051509923'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/02/generate-unique-id-php.html' title='Generate unique id (PHP)'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-22942188.post-114077377355402674</id><published>2006-02-24T17:32:00.000+08:00</published><updated>2006-02-24T17:36:13.556+08:00</updated><title type='text'>Detect browser type</title><content type='html'>&lt;span style="color:#cc0000;"&gt;javascript to detect browser type.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;Browser = navigator.appName&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;Net = Browser.indexOf("Netscape")&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;Micro = Browser.indexOf("Microsoft")&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;&lt;br /&gt;Netscape = false&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;IE = false&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;&lt;br /&gt;if(Net &gt;= 0) {&lt;br /&gt;Netscape = truealert("You're using Netscape")&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if(Micro &gt;= 0) {&lt;br /&gt;IE = truealert("You're using Internet Explorer")&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/22942188-114077377355402674?l=sintaks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sintaks.blogspot.com/feeds/114077377355402674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=22942188&amp;postID=114077377355402674&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/114077377355402674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22942188/posts/default/114077377355402674'/><link rel='alternate' type='text/html' href='http://sintaks.blogspot.com/2006/02/detect-browser-type_24.html' title='Detect browser type'/><author><name>dexidle</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='http://media.gamestats.com/gg/image/mafia_xboxbox_160w.jpg'/></author><thr:total>0</thr:total></entry></feed>
