AJAX, jQuery & how to bypass the same-origin policy

AJAX und Cross-DomainToday’s post is intended to give a brief introduction to the topic of AJAX with jQuery, as well as to cover the topic of cross domain (policy) and to show how you can use small tricks to send AJAX requests across multiple domains. Before we start, however, we will give you a quick introduction to the topic. If you are already familiar with the topic and are only interested in the AJAX cross-domain workaround, you can safely skip the first part of the article.
What is AJAX and how does it work in jQuery?
AJAX is an abbreviation and stands for “Asynchronous JavaScript And XML”. Contrary to the opinion of some people on the Internet, it is not a programming language, but rather a pattern, i.e. a way of programming something. By means of AJAX web content can be retrieved via Javascript, […]

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, message, […]

Basics: Secure password hashing with salts

Passwörter in Plaintext speichernAnyone 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.
Even if the actual login code is 100 percent error-free and secure (which should never be assumed in practice), security vulnerabilities in the server software can still lead to intrusions or hacks. There is always a variable that is out of one’s control and thus websites are hacked, compromised and complete databases with usernames and passwords are read every day.
In order to protect users in the best possible way in the event of such a hack, […]

How to read client hostname in PHP

How to read clienthostname in PHPThe following article is about how to use PHP to read out the client hostname, which is the computer name of a visitor. If you search in the internet, you will find out soon, that the whole thing is not so trivial. Either one gets simply wrong answers or one gets solutions, not in PHP but for example implemented in VBScript or it is said that it is not possible at all. But since it works, I would like to show you how to read the computer name, now.
But before we look at the solution, let’s take a quick look at the suggested solutions on the internet and explain why they are wrong or not recommended.
How to not read the client hostname in PHP
Often suggested but […]

How to disable PHP OPCache for certain directories

Deactivate OPCache per folderIn this article, I want to show you how to disable the OPCache based caching for certain directories. (If you need a short introduction to the subject of OPCache, you should scroll down to the blue box in this article.) Although OPCache is a good idea in almost all cases, there are, as with many thing, situations where you should make an exception. Especially when it comes to the development or if a bugfix is to be tested, it can make sense to disable OPCache.
However, since other projects that benefit from OPCache are often running on the same web server, a complete deactivation of OPCache for such test cases can not be an option. Therefore, this article is about how to disable OPCache on the directory […]