The Most Popular Ports

Wahyu Raja Reply 7:19 PM
As you can see it found a few open ports and listed the services that are run on them. Below I have a list of some of the most popular ports/services on the internet.

20 FTP data (File Transfer Protocol)
21 FTP (File Transfer Protocol)
22 SSH (Secure Shell)
23 Telnet
25 SMTP (Send Mail Transfer Protocol)
43 whois
53 DNS (Domain Name Service)
68 DHCP (Dynamic Host Control Protocol)
80 HTTP (HyperText Transfer Protocol)
110 POP3 (Post Office Protocol, version 3)
137 NetBIOS-ns
138 NetBIOS-dgm
139 NetBIOS
143 IMAP (Internet Message Access Protocol)
161 SNMP (Simple Network Management Protocol)
194 IRC (Internet Relay Chat)
220 IMAP3 (Internet Message Access Protocol 3)
443 SSL (Secure Socket Layer)
445 SMB (NetBIOS over TCP)
1352 Lotus Notes
1433 Microsoft SQL Server
1521 Oracle SQL
2049 NFS (Network File System)
3306 MYSQL
4000 ICQ
5800 VNC

Solution Resource interpreted as Script but transferred with MIME type text/plain

Wahyu Raja Reply 7:21 PM

I figured it out!
The Visual Studio installer must have added an errant line to the registry.
open up regedit and take a look at this registry key:
enter image description here
See that key? The Content Type key? change its value from text/plain to text/javascript.
Finally chrome can breathe easy again.
I should note that neither Content Type nor PercievedType are there by default on Windows 7, so you could probably safely delete them both, but the minimum you need to do is that edit.
Anyway I hope this fixes it for you too!

Make Your Website Fast by httaccess Expires Time

Wahyu Raja Reply 6:10 PM

3 Simple .Htaccess Rules For Better Website Performace

htaccess 3 Simple .htaccess Rules For Better Website Performace
.htaccess is the directory-level configuration file that allows us to adjust some sever configurations. Using .htaccess file effectively can increase website performance. In this article, we’ll see some simple rules for .htaccess file, that will make your website load faster!

Disable Etags

Entity tags (ETags) are a mechanism that web servers and browsers use to determine whether the component in the browser’s cache matches the one on the origin server. According to Yahoo! Performance Rules, disable ETags can make the page loads faster, decrease server load and reduce bandwidth if your website is hosted on multiple servers.
So, to disable ETags with .htaccess file, just put the following line into it:
  1. Header unset ETag
  2. FileETag None

Add Expires Headers

The expires headers tells the browser to store website’s components (images, scripts, flashs, etc.) in browser’s cache until they expire (defined by value of the expires header). Making far future expires headers that will make your page load faster because browser doesn’t have to request for those component, it simply takes them from the cache. Thus, this will decrease server load, too.
There’re several ways to define expires headers using .htaccess. You can set it with a specific time like this:
  1. Header set Expires "Tue, 16 Jun 2020 20:00:00 GMT"
If you want to add expires headers for some file types only, use the following code:
  1. <FilesMatch ".(ico|jpg|jpeg|png|gif|js|css|swf)$">
  2. Header set Expires "Tue, 16 Jun 2020 20:00:00 GMT"
  3. </FilesMatch>
The disvantage of this methos is that you have to specify the exact time of expires. There’s a second way that can be more flexible by using relative timestamp, based on current time of server or current time of access.
Try this line in your .htaccess file:
  1. ExpiresActive On
  2. ExpiresDefault "access plus 10 years"
This will add a very far future expires headers (10 years), based on time of access. If you want to use the current time, you can use:
  1. ExpiresActive On
  2. ExpiresDefault "now plus 10 years"
Very easy to implement, right?
This method allows you to add expires headers based on file type, too. You may want to do like this:
  1. ExpiresActive On
  2. ExpiresByType text/html "access plus 1 day"
  3. ExpiresByType image/gif "access plus 10 years"
  4. ExpiresByType image/jpeg "access plus 10 years"
  5. ExpiresByType image/png "access plus 10 years"
  6. ExpiresByType text/css "access plus 10 years"
  7. ExpiresByType text/javascript "access plus 10 years"
  8. ExpiresByType application/x-javascript "access plus 10 years"
As you see, adding expires headers for each file types is a bit complicated. You have to remember the mime-types of these types. That’s not always convenient. A better solution is: set the default expires headers for all file types, and modify expires headers for 1 file type only, like this:
  1. ExpiresActive On
  2. ExpiresDefault "access plus 10 years"
  3. ExpiresByType text/html "access plus 1 day"
This will add expires headers 10 years for all file types, except HTML file type (1 day). That’s good for almost blogs, because HTML file type often is the webpage itself, so you have dynamic content, make short expires headers keep your content always fresh.
Note that this rules requires mod_expires installed. This is a popular module, usually installed on almost web hosts.

Compress Text Files (CSS, Javascript)

Compress text files like CSS, Javascript or HTML files is a effective way to reduce the page’s size, and therefore, reduce page load time and bandwith. To turn on compression in .htaccess file, put the following lines into it:
  1. SetOutputFilter DEFLATE
The problem is that you don’t need to compress all files, especially image files (like jpeg, gif) because they’re alreay been compressed (using image compression algorithm). You should apply this rule for text files. So, change the code above to:
  1. <FilesMatch ".(js|css|html|htm|php|xml)$">
  2. SetOutputFilter DEFLATE
  3. </FilesMatch>
This rule requires mod_deflate installed. This module is not always installed on all hosts. I’m usingBlueHost and see it’s installed. Please check your host configuration (or ask your hosting company) to make sure it works (you can still leave them in .htaccess file, they won’t effect to other rules at all).

How to check whether or not rules were activated?

To check whether or not rules were activated on your host, you can use Firebug addon for Firefox. Make sure to activate the Net tab (the last tab) of Firebug.
After that, make some sample requests to your files and check the response headers. Here’s an example request that I made, you can see the expired date and compression method.
headers 3 Simple .htaccess Rules For Better Website Performace

Cache Control with htaccess EXPIRES BY TYPE

 / Published in: Apache

  1. # Cache Control with .htaccess EXPIRES BY TYPE
  2. # from
  4. ### turn on the Expires engine
  5. ExpiresActive On
  7. ### expires after a month in the client's cache
  8. ExpiresByType image/gif A2592000
  9. ExpiresByType image/png A2592000
  10. ExpiresByType image/jpg A2592000
  11. ExpiresByType image/x-icon A2592000
  12. ExpiresByType application/pdf A2592000
  13. ExpiresByType application/x-javascript A2592000
  14. ExpiresByType text/plain A2592000
  16. ### expires after 4.8 hours
  17. ExpiresByType text/css A17200
  19. # Please note that the "A" before the numbers above stands for Access.
  20. # This means that the stopwatch starts when a client accesses the file.
  21. # You can also use "M" for modified.
  24. # 300 5 MIN
  25. # 600 10 MIN
  26. # 900 15 MIN
  27. # 1800 30 MIN
  28. # 2700 45 MIN
  29. #
  30. # 3600 1 HR
  31. # 7200 2 HR
  32. # 10800 3 HR
  33. # 14400 4 HR
  34. # 18000 5 HR
  35. # 36000 10 HR
  36. # 39600 11 HR
  37. # 43200 12 HR
  38. # 46800 13 HR
  39. # 50400 14 HR
  40. # 54000 15 HR
  41. # 86400 24 HR
  42. #
  43. # 86400 1 DAY
  44. # 172800 2 DAY
  45. # 259200 3 DAY
  46. # 345600 4 DAY
  47. # 432000 5 DAY
  48. # 518400 6 DAY
  49. # 604800 7 DAY
  50. #
  51. # 604800 1 WEEK
  52. # 1209600 2 WEEK
  53. # 1814400 3 WEEK
  54. # 2419200 4 WEEK
  55. #
  56. # 2419200 1 MONTH (FEBRUARY)
  57. # 2505600 1 MONTH (FEBRUARY LEAP YEAR)
  60. # 31536000 12 MONTH

PHP get current page URL

Wahyu Raja Reply 11:05 PM

Step 1 - Get current page URL

PHP get current page URL
In PHP there are some built in global variables that make the getting the current URL process quite simple. You can get every piece of information about the current URL using the $_SERVER suberglobal array.
You can get the domain name, the script name, the url parameters and any variation of these.
After this introduction let’s see how it works. First of all try to figure out a complex URL structure like this:
Let’s take this URL to pieces:
  •     http - This is the protocol
  • - This is the hostname.
  •     test - This is a directory
  •     myscript.php - This is the actual script name
  •     name=Bob - This is the first URL parameter (city) and it’s value (Dallas)
  •     start=10 - This is the second URL parameter (start) and it’s value (10)
And now lets’s try to build the same URL with PHP. 
  • Get the protocol - http
The url protocol can be read out from the$_SERVER[‘SERVER_PROTOCOL’] variable. 
However if you check the value you can find that is not simply http or https but a string like this: HTTP/1.1

So we need some string manipulation to get a clean protocol string:
  1. $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') 
  2.                 === FALSE ? 'http' : 'https';

  • Get the hostname -
As next step we need to figure out the hostname. This is in the$_SERVER[‘HTTP_HOST’]. You can read it simply like this:
  1. $host = $_SERVER['HTTP_HOST'];

  • Get the directory and script name - /test/myscript.php
The $_SERVER[‘SCRIPT_NAME’] contains the full path with the name of the actual php script as you can see here:
  1. $script = $_SERVER['SCRIPT_NAME'];

  • Get URL parameters - city=Dallas&start=10
The last part of the current url is in the$_SERVER[‘QUERY_STRING’] and can be accessed similar to the others:
  1. $params = $_SERVER['QUERY_STRING'];

  • Get the actual URI - /test/myscript.php?city=Dallas&start=10
If the protocol and host name is not important for you but only the path, script name and the URL parameters then you can use simply$_SERVER[‘REQUEST_URI’] the as follows:
  1. $uri = $_SERVER['REQUEST_URI'];

So get the current page URL in PHP looks like this:
  1. $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') 
  2.                 === FALSE ? 'http' : 'https';
  3. $host     = $_SERVER['HTTP_HOST'];
  4. $script   = $_SERVER['SCRIPT_NAME'];
  5. $params   = $_SERVER['QUERY_STRING'];
  7. $currentUrl = $protocol . '://' . $host . $script . '?' . $params;
  9. echo $currentUrl;

Note: Almost all modern webserver with PHP supports the used $_SERVER variables, you need to know that: “The entries in this array are created by the web server. There is no guarantee that every web server will provide any of these.”  See PHP $_SERVER manual

Tags: php get current url, get page url, php get url, get actual url, get query string, get hostname, php

How to Hide Files from Apache Directory Listings

Wahyu Raja Reply 9:35 PM
Apache HTTP Server comes with a useful feature for file viewing called “directory listing” or “directory browsing”. With this feature enabled, users who visit a directory without an index file will see a list of the files in that directory, as well as information about them. This is useful for HTTP download mirrors and similar sites because it allows the website owner to list large numbers of files without having to create pages to list them.
In some situations, directory listing may not be ideal at all, and you can globally block indexing in the Apache configuration file or locally in an htaccess file. A web server that allows indexing will have a directive that looks like this:

Options +Indexes
To disable indexing, simply remove “+Indexes”.
In other situations, you may want to make use of directory listings, but you may want to hide certain files. You can do that with the IndexIgnore directive. Like other directives, you can apply this one globally in the Apache configuration file or locally in a website’s .htaccess file. The format is as follows:
IndexIgnore filename
For example, if you want to prevent users from seeing files called readme.txt, you would enter:
IndexIgnore readme.txt
You can also enter partial matches with the “*” character:
IndexIgnore *.php
IndexIgnore is part of Apache’s mod_autoindex module. For more information about Apache’s IndexIgnore directive, consult the Apache web server documentation.

Source :

Add and Substract Two Date PHP, MSYQL, Codeigniter

Wahyu Raja Reply 9:29 AM
You can two ways for find add and substract date. Try this :

Step 1
$datetime1 = strtotime('May 3, 2012 10:38:22 GMT');
$datetime2 = strtotime('06 Apr 2012 07:22:21 GMT');

$secs = $datetime2 - $datetime1;// == <seconds between the two times>
$days = $secs / 86400;
Step 2 :
$date1 = "2007-03-24";
$date2 = "2009-06-26";

$diff = abs(strtotime($date2) - strtotime($date1));

$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));

printf("%d years, %d months, %d days\n", $years, $months, $days);

Sitting is Killing You

Wahyu Raja Reply 5:45 AM

Take Care of Your Health

As we enter the second decade of the 21st century, there is one thing nearly all modern Americans have in common: we sit all the time. Though our great shift towards computer-based work has done great things for productivity, it has, unfortunately, done terrible things for our health. Simply put: sitting is killing you. From increased risk of heart disease and obesity in the long term, to sharply hampered cholesterol maintenance in the short term, the negative health effects of sitting are starting to weigh heavily against the benefits. Even the medical field – the greatest advocates of reducing sitting time – is plagued by this new health issue. Though doctors and nurses get plenty of walking time, it usually falls to the secretaries, billers, and coders to do all the sitting
Sitting is Killing You

Solution external hard drive didn't shows up, external hard drive is read only

Wahyu Raja Reply 5:44 AM
Try rebooting the computer without any USB devices attached. Then plug in the USB drive, right click on My Computer, select manage, and then click ?Disk Management.? If the drive is not present in the Disk Management window or if you are not able to access it, then the drive may have failed. In this window you should see all of your connected physical drives, their format, if they are healthy, and the drive letter.
Change the drive letter of the drive. Right-click on the drive in the list, and from the resulting menu select "Change Drive Letters and Paths"
Click on Change so you can change the drive letter. Click Change. Select a new drive letter from the drop down list, preferably the one that is not normally used for this drive.
Click Yes on the confirmation screen and you are done.

Write down all fixed Disk and CD/DVD drive letters so as not to delete them. DO NOT delete any of the fixed hard disk drives or CD/DVD optical drives registry values.

1. Login with Administrative privileges.
2. Disconnect all USB or FireWire storage devices.
3. Open Registry Editor by typing regedt32 in the Run box and navigate to the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
4. Under HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices there will be registry keys with the name that resembles the format of \DosDevice\X: where X can be any alphabet letter which corresponding to your physical system drive letter.
5. Delete all possible USB drives, FireWire drives and external drives which have a drive letter.
DO NOT delete any of the fixed Hard Disk Drives or CD/DVD optical drives registry values.
Exclude \DosDevice\A: which normally reserved for floppy disk drives.

Click Start and in the Run box type in cmd and press Enter.
At the command prompt type in chkdsk U:/r 'the drive letter that you just added:' EG: U: and press enter.
If it finds any discrepancies it should fix them.
Tip: The cause of unpredictable behavior in a USB drive is often found to be the incorrect removal of a previously connected USB device. When removing USB devices right click on the ?Safely Remove Hardware? icon in the menu bar tray. This is usually found in the bottom right hand corner of the monitor. Once you have clicked on the icon, a menu with a single selection should appear. Click again on that selection to see the ?Safely Remove Hardware? window. Select the correct USB device and click the ?Stop.? When you receive the message that it is safe to remove the device, unplug the USB device from the computer.

external hard drive is read only

Maybe you need to attrib it in the DOS mode... ??
If you can't do that, then here's something I found that might help, feeling a little lazy to key down all the ways myself so I'm going to just copy and paste....
"Here is what I know:

1. Under the Security Tab in Folder Properties The only group defined there is: “Everyone – Full Control”

2. Under “Advanced Settings - "Owner “ - It shows some long number that starts with "S" , if I try to take ownership and turn it over to administrator, I get something to the effect of “Could not write permission changes”: Access Denied. I get that on all attempted changes, on the programs folder and all of its subfolders and files.

3. The programs folder spoken of above is in the root directory of a partition on one of my drives and is labeled E:/Programs - I normally install all my programs there, all except those that insist on being on C:\Programs, which so far is un-affected like E:/Programs.

4. Both the root above the programs folder (E: the parent) , and the Programs sub-folder itself did not have the usual access permissions
a. The Only security group defined was “EVERYONE” – Full Control
b. No “Administrators” Group
c. No “System” Group
d. No “Creator /Owner” Group
e. No "Users Group"

5. The Root (ESmile showed that the owner Was Administrator in Advanced Properties.

6. Under the security Tab for the root (ESmile I was able to add The ADMINISTRATOR, SYSTEM, AND USERS GROUP, saving the permissions for the root (ESmile was not a problem.

7. Changing permissions in the Root Directory of course had no effect on the (problem) programs folder, I could not even get it to inherit the permissions I successfully created in the root, because of course it could not save (write) the permissions to the ACL for that Folder ! ACCESS DENIED as usual!

Note: I noticed part of this thread mentioned Read Only Attributes that are set on the properties General Tab of Folders and Files, these have no bearing on being able to delete files and folders, using a file manager like Windows Explorer or My Computer !"

"To remove the issue you will need to edit the windows registry file. This addition can be caused to a infection. First go to start menu and then click on run. Type regedit. In the registry editor windows go to file menu and click on export. Save the file to a desired location. This is because in case if there is any error you can restore the registry file back again. Then Navigate to the path HKEY_LOCAL_MACHINE > System > CurrentControlSet > Control > StorageDevicePolicies. Now right click on writeprotect and then click on modify. Change the value to 0 and click on OK. Repeat the same for ControlSet001 and ControlSet002. Close it and restart your system."

The lock can be opened and closed by single command in cmd. Insert your drive and give the chdir command to locate your hard drive. Then type sys: on to enable the write protection and sys: off to disable the write protection service. Also see your bios settings. Some bios have write protection settings. If it is enable then you have to disable it from there.

First click on Start > Run... > regedit > OK

Highlight "Computer" and right-click. Select "Export" and save the backup somewhere safe. Just double-click it if you want to reset the changes you make.

Navigate to the following registry location:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro l\StorageDevicePolicies

Click on StorageDevicePolicies and on the right-hand side there should be a DWORD value labelled "WriteProtect". If there isn't one, create it. Either way, make sure it has a value of 0. Double-click it to change it.

Do the same with the following two locations (creating any non-existent keys/values along the way):



> go to control panel
>open administrative tools
>select and open computer management
>Under the "Storage" option you will find "Removable storage"
>Right click 'removable storage' and select properties
>You will find a security tab...add yourself and give full read, write & modify permissions..
save and exit. and then copy paste or make changes to the removable storage and it will work..


Ikuti Channel Youtube Aku Yaa.. Jangan Lupa di subscribe. Terima kasih.

Google+ Followers

Popular Posts