I made a whopping 0,12€ with ads on this blog over the last 30 days (and just disabled them entirely, don’t want to get corrupted by all that money). However, what really caught my attention in the report was a domain that doesn’t belong to me (or my company):
So, apparently t****4web.com used my Adsense code on their site, resulting in a single ad impression (and nobody clicked on it, otherwise, my ad revenue would have been at least
three two times bigger). How and why did this happen?
The innocent explanation is that their “Web Back Machine” (which sounds suspiciously similar to the non-profit Wayback Machine) archived one of my pages, including the Adsense ads. That’s possible, but what is more likely it that this is Adsense referrer spam, meant to get me to visit their website. I’ve got to admit that it worked, so now I have to write this blog post to justify my actions to myself, see, it was all in the name of research.
For further information on Adsense referrer spam, let me refer you to this comprehensive, well-written article.
Create GS1 compatible DataMatrix barcodes in P-touch Editor by following these steps:
Insert the DataMatrix barcode
In P-Touch Editor, select Insert > Bar Code from the menu. Switch to the Protocol tab and select the DataMatrix protocol:
Add the Function 1 Symbolic Character (FNC1)
This special character is used to differentiate GS1 DataMatrix from other Data Matrix barcodes. Go to the Setup tab and check the Specify Industrial Protocol (FNC1) box:
Add the GS1 element strings
You must follow the GS1 rules when encoding data in a GS1 DataMatrix. I highly recommend that you review Chapter 2 (Encoding data) in the GS1 DataMatrix Guideline (PDF). P-touch editor won’t prevent you from making any mistakes!
As an example, I’m going to recreate the GS1 DataMatrix barcode found in TL A-0032 Part 1, Edition 7 (page 12).
It contains both a GTIN-13 (4012345000016) and a serial number (ABC17829). The corresponding GS1 DataMatrix Application Identifiers are 01 (GTIN-13) and 21 (serial no.). The GTIN-13 has to be padded with a leading 0 to match the expected length of 14 characters. Therefore, the concatenated string is 010401234500001621ABC17829:
The resulting barcode matches the example, though it seems that P-touch Editor cannot add the Human readable Interpretation (HRI):
You could, of course, add the HRI using the text tool.
For further information, please consult the GS1 DataMatrix Guideline (PDF)!
1. DIO Direct I/O functions
The DIO functions have not been bundled with PHP for years, but you can download the DIO Package here (it’s still in beta). The following article contains instructions on how to install and use it: How do I control a serial port using PHP? The required php_dio.dll file is available for PHP up to version 5.6, though the PHP manual says that the DLL is “currently unavailable” (which is true if you’re using PHP 7).
On a Linux system, according to what I’ve read, the DIO extension is probably the best way to use a serial port with PHP.
2. PHP Serial class (a.k.a php_serial)
The current version can be found here. “There is lots of bugs”. On Windows, “it seems to be working for some people, not working for some others.” Good luck.
3. Serial-to-Network Proxies
You’ll find many of these proxies on Arduino Playground, including useful descriptions. They are written in languages better suited for the task (well some of them are) and act as intermediaries between serial and network connections. In PHP, you’d simply connect to the socket provided by the proxy (careful, some are unidirectional). This option might be your best bet on Windows, but obviously makes things more complicated.
This list is not exhaustive, but at this point I decided to abandon the entire idea. Don’t hesitate to post your solution in the comments if you’ve found one that isn’t listed. However, please don’t bother asking me any PHP-and-RS-232 related questions as I won’t be able to answer them.