Steganography with PHP – Hide files in images

Steganographie mit PHPIn this article we want to deal with the topic of steganography and implement a small example in PHP. Because PHP is not “only” used to create web pages or to implement forms, as any experienced PHP programmer of larger web agencies will surely confirm.
Besides functions for text processing, PHP also provides methods for image processing as well as for manipulation on bit and byte level. And these are the ones we want to use today. But before we start coding, we will have a short introduction to the topic of steganography.
Steganography is not shorthand
As the title already announced, today’s topic is steganography, the art of hiding information or knowledge in a carrier medium. Wikipedia defines steganography as follows:
Steganography (/ˌstɛɡəˈnɒɡrəfi/) is the practice of concealing a message within another message or a physical object. In computing/electronic contexts, a computer file, […]

How to set default editor in WinSCP

When it comes to secure file transfer, one or the other of you should probably have heard of the SFTP-client named WinSCP. WinSCP enables the secure transfer of data between two computers based on either the SSH protocol or the SFTP protocol and provides, as also many of the normal FTP-clients do, the functionality of editing files directly on the server (respectively edit them direct out of the WinSCP interface without the premise to manually download the files before editing).
Unfortunately WinSCP will open all text files in his own simple style editor. But if you want to edit script files like PHP scripts, which is what I want to do most times, you will miss the comfort of a good text editor like Notepad++ or Sublime Text. But don’t worry – there’s a solution also for this problem, so that you don’t have to give up your beloved features like syntax highlighting […]

How to compare dates in PHP

php_date_compareHow to actually compare 2 dates in PHP with each other? The question sounds easier than it is.  The first thought that usually comes is the following. We store both dates as strings and compare them.
Preliminary

<?php
$date1 = "2012-1-12";
$date2 = "2011-10-12";

if ($date1 > $date2)
echo "$date1 is newer than $date2";
else
echo "$date1 is older than $date2";
?>

Output:

2012-1-12 is newer than 2011-10-12

At first glance this seems to be a workable solution. But what if the two data is in a different format?

<?php
$date1 = "12-1-12";
$date2 = "2011-10-12";

if ($date1 > $date2)
echo "$date1 is newer than $date2";
else
echo "$date1 is older than $date2";
?>

Output:

12-1-12 is older than 2011-10-12

Now the date in 2012 is declared to be older than the date in 2011, which is of course wrong. However, from PHP’s point of view, this behavior is correct, because two strings were […]

How to add multiple free images to your eBay auction

ebay_logoToday it is about eBay. Specifically, about how you can add as many pictures as you like into your auction description for free. So there will be no additional costs, such as it would normally be the case, when you use the image features of eBay. Thankfully eBay gives us almost everything that is needed to add free images to our auctions.
To better explain the procedure, I created a fictitious offer on Ebay. Who does not like to read, of course, can also scroll to the end of the article and watch the whole explanation as screencast. And here’s how it works:
Step 1:
ebay_kostenlos_bilder_1  ebay_kostenlos_bilder_2
After you have entered the basic information and […]

How to install Ubuntu on Samsung Galaxy S2

Android Ubuntu ScreenshotToday there is again an article on Android. More specifically, it’s about how you can run Android and Ubuntu (Linux) in parallel on your smartphone or tablet. Although I had already blogged about it before, but today I want to explain the whole setup process, step-by-step (using a slightly different method).
The title of this article is actually not quite correct, because we will not install Ubuntu, but setup some kind of a live system – so we get down to business.
I used my Galaxy S2 for the project. If it works with other smartphones, I could not test, but would be happy about comments on your part, if you tried it.
 
For our purposes we need the following things / conditions:

Android based device with root rights
Android Terminal Emulator (freely available on Google Playstore)
android-vnc-viewer (freely available on […]