Blog Detail
Adam's Info
http://www.adamsinfo.com/
Adam’s Tech Talk, Linux HOWTOs & Discussion
Write and discuss with Adam Palmer MBCS CITP.
This blog is dedicated to Linux related technologies, networking and routing, and tutorials / advice.
Recent Posts
PHP Programmer – Reading from files
Here I’ll give some file reading examples. There’s a few different ways to do this. I’m going to focus on plain text files only, as opposed to binary files. If you just want to read the contents of a file into a string variable, th...
PHP Programmer – strlen, count and substr
PHP Developer – strlen, count, and substr The strlen function retuns the length, i.e. number of characters in a string: int strlen(string s) count will get the number of elements in an array: int count(array a) substr will return a “...
PHP Programmer – strpos, finding the position of a word in a string
In PHP, we can use strpos to find the position of a character or string within another string: int strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) For example: <?php $mystr = “this is a test string”; $pos = st...
PHP Developer – Serialize
PHP has two ver useful functions, serialize and unserialize. serialize() generates a string based storable representation of any variable type that you like. Take a complex variable: <?php a = "test"; $obj->b = "string"; $obj->c = Array("t...
PHP Developer – Loops in General
There are 3 types of loop in PHP: while (condition) { code_goes_here; } do { code_goes_here; } while (condition); for(expr1, expr2, expr3) { code_goes_here; } In terms of the ‘for’ loop above, ‘expr1′ being the starting expre...
UK VPN Hosting
I’m going to be offering some VERY high end UK VPN hosting accounts in the next few weeks once I can get a site and signup form up and running. The VPN servers will run from within the same cluster as this site, and so you can test your ping t...

