Steganography with PHP – Hide files in images
In 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 […]
Anyone who develops software and especially if he/she does so in the web environment, has certainly already written one or the other login system or at least had points of contact in this area. Besides the logic of a secure login or user management system, the secure storage of passwords is one of the most important points during implementation.
Regular users of my blog should already be familiar with “Google Suggest”. Those can skip ahead to the section “Wildcard operator in Google Suggest”, for all others here is the quick start. Google Suggest is the name of the Google functionality that is responsible for suggesting possible search queries while you are typing your search query. For example, if you type “What are the most popular”, Google will suggest “What are the most popular sports in Australia”. The suggestions, in turn, are based on the one hand on the user’s own Google search profile and on the other hand on the most frequent search queries currently sent to Google by other users.
I think almost everyone knows the scenario: You work on a Word document and either Word itself or the entire computer crashes. In order to prevent a total loss of the document, Word can activate the so-called “auto save” function, which saves the document automatically every X minutes. So in a crash only the changes since the last automatic save are lost.