Detecting request type in PHP

For detecting request type in PHP we can use variable $_SERVER by using $_SERVER[‘REQUEST_METHOD’]. $_SERVER is an array containing information such as headers, paths, and script locations. The entries in this array are created by the web server. Following methods can be detected with key ‘REQUEST_METHOD’: GET POST PUT DELETE Example:

Read More

How to mount remote directory using SSH ?

How to mount remote directory using SSH and make it available it as local directory. Install the module sshfs:

Load it to kernel

Set permissions

Now create a directory to mount the remote folder in.

Run the command to mount remote directory

Now remote directory should be mounted.

Read More

How To Record Streaming Audio In Ubuntu

How To Record Streaming Audio In Ubuntu: Audio Recorder records all type of sound your computer makes. It records audio played through your system’s soundcard, microphones, browsers, webcams and more. It provides option of selecting the recording device such as webcam, microphone, Skype etc. Use a PPA to install Audio Recorder in Ubuntu. Use the following […]

Read More

What is a WordPress Theme Text Domain ?

In this example ‘my-theme-textdomain’ is the defined as textdomain for the Theme. Text Domain is used to make the Theme translatable. (Codex reference: load_theme_textdomain()). Define the Theme’s textdomain load_theme_textdomain( 'my-theme-textdomain', TEMPLATEPATH.'/languages' ); Define translatable strings in the template. This is done using one of a few translation functions: __() (for returned strings), _e() (for echoed strings), and _x()/_ex() […]

Read More