Thursday, April 17, 2014

Send email using Xampp from localhost


I always have problem for testing my PHP codes which were include mail function. I used to upload them on server to test them. But today I decided to find the way to send the mail with PHP using XAMPP from localhost. Then I decided to share this simple tip with you guys. Before we start the procedure you need to have an email address on a running mail server such as Yahoo, Gmail or any other server that you have access to configuration of them as well, because we need their port number.

  1. First go to the path that you installed Xampp application. By default it is "C:\xampp\".
  2. Then we need to find the php.ini file which contains the configurations belong to PHP. This file by default is located at "C:\xampp\php\php.ini". Open it using any text editor like notepad.
  3. Using search in the editor try to find "sendmail_path". There should be two of them. One is commented using a ";" (semicolon) in the beginning of the line , and the other one is not commented. Comment the one that is active and active the one is commented. After the edit it should looks like below... (Similar)
    sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
    ; XAMPP: Comment out this if you want to work with mailToDisk,...
    ;sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"
  4. Save the php.ini file and restart the Apache process. This is necessary for the configuration to take place.
  5. Next navigate to the sendmail directory. By default it should be located at "C:\xampp\sendmail" and open the "sendmail.ini" in the text editor.
  6. Now we need to set the configuration for the mail server. For this case I chose Gmail. The SMTP address of Gmail is: "smtp.gmail.com" and the SMTP port for Gmail is "587".
  7. Find "smtp_server" and write the Gmail SMTP address in front of that.
  8. Find "smtp_port" and write the Gmail SMTP port in front of that.
  9. Scroll down , you should be able to see "auth_username" & "auth_password". Put your gmail username in front of  auth_username and put the password in front of auth_password .
  10. Save and now you are good to send mail from local host. 
  • Note that your PHP mail function should have "from" header,otherwise your mail will not go through. 
  • Also remember the that the destination will receive the mail from your Gmail address not from the address you put in your PHP code.
  • The following code is a simple example of PHP script which can send a successful mail.
<?php
$to = "destinationAddress@Anywhere.com";
$subject = "The mail subject goes here";
$content= "And this is the mail content!";
$headers = "From:Me@Mywebsite.Com\r\n";

mail($to,$subject,$content,$headers);
?>

Sunday, March 2, 2014

How to enable "Developer Options" menu in Android JellyBean and KitKat


"Android Development" is one of the option by Android operating system which allows the user to do development activities using his Android smartphone. This feature allows the developer to access the android device from computer by the help of Android Debug Bridge(ADB).
In older versions of Android the "Developer options" sub menu, by default was accessible from "Menu > Setting > Developer options". However from JellyBean 4.2 onward this sub menu disappeared. In the other words Android hide this sub menu.
To activate "Developer options" menu in JellyBean or KitKat  you need to do following steps:

  1. Goto "Menu"
  2. Goto "Settings"
  3. Goto "About the phone"
  4. Find the "Build number" (Probably it's in bottom of the screen. The last item!)
  5. The "Build number" option might be in another submenu, and this vary depends on the device brand however you can find it in one of the sub menus under the "About the phone".
  6. Tap few times on "Build number"
  7. Now it should shows a toast "You are now a developer!"
Enabling Android Developer menu
Android Developer menu activated
Now the "Developer options" menu must appeared in "Settings" menu. Just go one level back and you should see it in the bottom of screen.

Sunday, January 26, 2014

Clevo P570WM / Sager NP9570 Notebook Review & Performance Test


Sager is a brand name for a company which does high performance notebook customization. In the other words, you can order a notebook with fully customized parts. All the products of this company are high performance which mostly used for gaming and graphic design purposes. The Intel X79 express chipset allows this notebook to work with desktop CPU. Moreover it can support quad channel memory. The desktop CPU supporting feature is unique between all notebooks around the world which allows the owner to replace the CPU with a new model of desktop CPU.
This model is capable to upgrade to 3D screen, because the LCD support 120HZ refresh rate. Another feature is "Sleep and charge" which let it to have power on USB ports while its off.

This notebook customized with following options:
Motherboard
Intel® X79 Express Chipset

CPU
Intel® Core™ i7-4930K, 3.4-3.9GHz (22nm, 12MB L3 smart cache - 6 cores / 12 threads)

RAM
4x4GB SODIMMS (16GB 1600MHz Ram) Quad Channel

Graphic
SLI (2x) - NVIDIA® GeForce™ GTX 770M (6.0GB total) GDDR5

SSD
2x Samsung 840Pro 256GB

HDD
WD 750GB 7200RPM

RAID
SSD RAID 0

Ethernet
Built-in Gigabit Ethernet LAN

Wireless
Intel® Dual Band AC 7260 802.11 A/AC/B/G/N 2.4/5.0GHz + Bluetooth™ 4.0

Thermal Compound
IC Diamond Thermal Compound - CPU + GPU

LCD
17.3" FHD 120Hz (16:9) Anti-Glare Matte-Type 72% NTSC Color Gamut Screen (1920x1080)

DiskDrive
Blu-ray reader

Sound
Built‐in High Definition Audio Sound System
THX® TruStudio Pro™
External 7.1CH audio output supported by headphone, microphone and Line‐in jacks
1 x Built-In Microphone
5 x Built-In Speakers
1 x Built-in Subwoofer
Sound Blaster Compatible

Camera
Built in 2.0 Megapixel Camera

Memory Card Reader
Internal 9-in-1 Card Reader (MMC/RSMMC/SD/Mini SD/SDHC/SDXC/MS/MS Pro/MS Duo)

Input/output Ports
1 x DVI-I Output Port
1 x HDMI 1.4a Output Port
1 x Display Port 1.2
2 x USB 3.0 Ports
2 x USB 2.0 Ports
1 x eSATA Port
1 x IEEE-1394b Fire Wire
1 x RJ45 LAN
1 x Headphone Jack
1 x Microphone Jack
1 x Line-in Jack
1 x S/PDIF Output Jack
1 x ExpressCard 54/34 Slot

Extra Feature
Built-in 2.0M Digital Video  |  Kensington® Lock  |  Fingerprint Reader

Battery
8 Cells - Smart Lithium-Ion Battery Pack (78.44WH)

Size
16.50" (w) x 11.30" (d) x 2.20-2.40" (h)

Weight
5.5 KG including battery


The following pictures are the results of test that done using CPU-Z tool. The pictures show the CPU, Cache, Main board, Memory, and GPU performance.

Saturday, December 21, 2013

Adding Custom Contact Form to WordPress


First of everything I am very sorry that I didn't update the website for a long time. I was really busy with my academic researches. Now  I am more free and try to update the website more regularly.

Today post is regarding adding a custom contact form to wordpress blog script. Sooner one of my customers ask me that we need a website on core of wordpress and moreover we need a custom form which should email the details of the form, when the submit button pressed.

For adding a custom form which be able to email the form data to a specific recipient (webmaster), we have to do the following steps:


  1. First I suggest to do this experiment in your local host, after a successful result you can apply it to your host. 
  2. Go to your current template path. In my case it is : "\wp-content\themes\twentythirteen".
  3. Make a new PHP file and rename it to "custom-form.php".
  4. Create a folder and rename it to "form-files".

Monday, August 26, 2013

root25.com 1st Birthday


Today 26. August is the first birthday of root25.com website. Even during this past year I was busy with my studies , but I try my best to maintain the website with good content and answer visitors.
I would like to say THANK YOU to all fans which support root25 during this past year.
Lately I start a new track in the website and its "free online information security classes" which already started on 5th of August. These classes started from beginner level and will continue to professional security and penetration classes. I try to post valuable and unique content which help us improve the traffic of website as well.  I hope you will be happy with the site and support us by sharing and spreading the name of "root25.com".
Now I would like to share some statistic related to root25 for our dear fans and followers. 

root25 Google + profile got 1,186 followers.
root25 Twitter profile got 1,185 followers.
root25 Facebook profile got 774 fans.
root25 Stumbleupon profile got 129 followers.

root25.com visitors
root25.com Visitors
root25.com visitors map overlay
root25.com Visitors map overlay.
root25.com visitors countries
root25.com Visitors countries
root25.com visitors browser technology
root25.com Visitors browser technology


Friday, August 16, 2013

Lesson 004- Domain Name Service (DNS) & DNS Security


In previous lesson we discussed about IP addresses. Remembering the IP addresses is difficult. It's not easy to remember all IP addresses that we need for our daily use. Domain name service (DNS) allows us to use "easy to remember" names instead of memorizing IP addresses. For instance instead of remembering 173.194.44.230 we can use www.google.com 
DNS is like a phone book for the Internet. There is a name for each website and instead of a phone number there is an IP address exist for each website. DNS uses a distributed database system where each organisation is responsible to maintain data for their own domain. 
DNS has a hierarchical nature. There are root DNS server which provide high level information for individual DNS server to tell them what server is responsible for all .net domains or what server is responsible for all .com domains. Similar servers exists for each top level domains ( .com , .net , .org). Each of these servers then distribute authoritative for specific domains to the name servers  run by the organisations that owns the domain or their Internet Service Provider (ISP) . for instance yahoo.com runs its owns DNS servers. Yahoo DNS servers will have all information about yahoo sub domains such as www.yahoo.com or mail.yahoo.com
 .


Each organisation might use a relative extension after its domains. For example MIT is an educational institute which use .edu extension at its own domain ( mit.edu ) you can find a more detailed list of top level domain list at ICANN .
When a DNS server receive a request from a client on its network from a domain which its not authoritative for , It has two options: (A) Check the DNS cache. (B) Perform a hierarchical look up.
Each DNS server keep a cache of recently looked up domains. For better understanding I will give you an example. For example you are on the aol network and you try to access root25.com website. So first you need to enter root25.com in the web browser. then your computer will look up in the local DNS server. DNS server of your company runs by aol.com so its not authoritative for root25.com domain. However the DNS server might recently ask the same question from another DNS server for another user which trying to access the same website. So the first place it will look up is the cache (memory) to see if it has the answer. If it didn't find the answer in the cache, it will go to perform a hierarchical look up. 
hierarchical look up check with the root server to find the responsible DNS server for the ".com" domains. then it will contact one of those .com domain servers and ask which server is responsible for root25.com. Afterward it will contact that name server to find the specific IP address for www.root25.com .

There are some security threats related to DNS such as:

Saturday, August 10, 2013

Lesson 003- Network Ports



As we learned in the previous lesson, IP addresses uniquely identify computers. Most of the times each computer has more than one services. For instance a computer can be a web server and a file server in the same time. For addressing this in addition to having a unique IP address we have a unique PORT for each service on a computer. 
Ports are used by transport protocol to uniquely identify different services and applications. Ports are like doors to a computer services, each port can point to one of services on the computer. The idea of "Port" first introduced by ARPANET, but in that time it was known as "Socket number".
The Internet Assigned Numbers Authority (IANA) created standards for using port numbers. Without knowledge of these ports user needs to ask the administrator about the details of port configuration. Using these standards are not compulsory. We can categories ports in two types:


  • Well known ports : are ports between 0 to 1024 which are assigned by IANA for special purposes.
    Some of these well known ports are:
    20/21  FTP
    22       SSH
    23       TELNET
    25       SMTP
    53       DNS
    80       HTTP
    443     HTTPS
    (For the complete list please refer here)

  • High number ports : are ports between 1025 to 65535 which are available for other services.
The important fact that we need to remember is that each transfer protocol has it's own ports. For instance a port number on UDP is different from the same port number on the TCP protocol. For easing the differentiate process of these ports we always bring the protocol type after them. 
For example : 22/udp or 22/tcp

Social Networks Sharing