PHP strlen

strlen()-To find the length of a string To find the length of a string, we use a function strlen(). Let’s use this function to find the length of...

PHP Concat Strings

Concat Strings Two strings can be concatenated by using the operator dot (.). Let’s see this with an example: <?php $str1="Learn"; $str2="PHP";...

PHP Strings

PHP String A string is a text that might contain characters, numbers or any special character. First of all, we will create a string. Either a string can...

PHP Comments

PHP comments Comment is that part of the code that is not parsed by the parser. The main objective of the comment is to provide necessary notes to the...

PHP Operators

PHP Operators The PHP operators can be divided broadly into 5 categories namely, Arithmetic Operators Assignment Operators Comparison Operators Logical...

PHP Variables

PHP Variables What are variables? Variables are names that store values like strings or numbers. Their values can change at any point in the whole program....

PHP Output

PHP Output To display the result of a PHP script, there are two basic commands. They are echo and print. Both these commands are used in PHP to display...

PHP Basics continued

PHP Basics PHP runs on different platforms. PHP is compatible with almost all servers used today. PHP is FREE to download from the official PHP resource....

PHP Tutorial Basics

PHP is a recursive acronym for “PHP: Hypertext Preprocessor”. It is an open source. It is a server-side scripting language, i.e. the PHP script...

sqlite 10 sec guide

Problem You want to get up and running with sqlite Solution Install sqlite3 on linux, via yum: yum install sqlite3Then just run sqlite dbname Example %...

starting binary – library file not found

Problem Getting an error about not being able to find libraries (file not found), when starting up a binary – such as httpd. Solution You need to...

the fade anything technique

Problem You want to add something flash to your site.A color loads, which you then want to change Solution Well cool “Fade Anything Technique”!Really...

AJAX Specialist

coming soon …

Stripping out newlines from string

Problem Different versions of UNIX handle the stripping of newlines in a string differently. Obviously if you echo a string, the shell automatically expands...

Resize image command line – mogrify

Problem You want to resize images from the command line. Solution Use image magik mogrify command.mogrify -resize "percentage" image_naAlso you can view...

UNIX Pipes – event triggers action

Problem You want to listen on a pipe and perform commands, based on the text sent to the pipe.This could be useful for triggering action based on events;Running...

ldapsearch limit returned results

Problem You want to perform an ldap search but only receive a limited number of records in return. Solution Use -z # to restrict the number of records...

ldapsearch greater than

Problem You want to search for a field greater than a value, in your LDAP search. Solution To search for a field with a value greater than a given figure,...

phpdoc-msg

These pages have been retired, check out php docs

receive notification when file arrives

Problem You want to get notified when a file arrives. Maybe it is coming in from somewhere else, or just is the result of some processing.What ever the...

UNIX debugging

Problem You want to debug a running process on Solaris?You want to debug running process on Linux? Solution See the example for debugging processes on...

Smallest AJAX example in the world?

Problem Learn and demonstrate some simple AJAX.To produce a clear, clean example – as small as possible. Solution Can a smaller working AJAX example...

Shell Tips and Tricks

Problem You want to trace program execution on Solaris?You want to perform network tracing on Solaris?Perform a text dump of a binary file – or see...

undocument find secret

Problem You want to find a pattern in a file and have the line displayed. Solution I “discovered” this undocument (well in all the doco I’ve...

Optical Dump

Problem Ever need to look at a file, but have not been able to – due to hidden control characters, etc. Solution Or just needed to see spaces and...

Shell Utilities

Problem You want to compare 2 streams, with byte offset and line numbers?Pull off content with a byte offset?Display lines before or after a pattern?Send...

openssl many uses

Problem You want to generate a self-signed certificate?Encrypt a message with triple desView base 64 encoded dataGenerate and use random dataTest ciphersMonitor...

uuencode send attachments

Problem You want to send an attachment, from UNIX command line or from within a shell script Solution uuencode works a treat with Solaris. Not sure on...

tar many uses

Problem You want to make some backups with tar. Solution tar is very functional and has many uses. Example If you are lucky enough to have GNU tar (tar...

Port forwarding with SSH

Problem You want to forward all traffic from a port on your box, to another host/port combination. Solution The command in the example will port forward,...