S7 / S7 Edge – Reset Google Advertising ID

It’s pretty well known in the advertising world, but very few consumers are aware that their Android devices have a numeric ID  associated with them, and that this ID is used to track your device for the purpose of targeting you with Ads. It’s less well known that this ID can be reset to a new random number. This won’t stop Google, Facebook, Whatsapp, Instagram, etc., from using targeted advertising, since you have accounts with them and they can simply associate your new device ID with the account you use… but it will certainly put a damper on plans from...

PHP Database Wrapper Class Return Values…

Writing your own PDO Database Wrapper (Abstraction Layer, or DBAL) can pose some interesting challenges. Among the most notable is, “How do I pass my PDOStatement object when catching an exception?” You don’t. You could use $this->stmt to pass the value around within your class. However, this will cause issues with foreach() and while() loops. Let’s look at an example: while($o = $db->fetch_object()) { // do stuff here $db->query(“a query here”); while($a = $db->fetch_object()) { // Do more stuff here } } The trouble with using $this->stmt or a similar construct is that the value of $this->stmt will be overwritten when...

is_int(), ctype_digit(), and You…

One of the things we like to do as PHP Programmers is to validate input. The above sentence is a lie. However, one of the things we have to do as PHP Programmers is to validate input. In a digital world with sophisticated users constantly on the prowl for a way to crack into your fortress and spill all your secrets, ensuring that we get what we expected to get – and then escape the hell out of it before we let it do anything – is critical. Those who fail to learn this lesson will be the detritus of...

About This Site

Zbmowrey.com exists as a digital journal. It’s my hope that the information I post here might some day be useful to someone else, but my primary aim is to build a spot on the web where I can tuck away the tricks, tips and other information I stumble across on my path as a web programmer. (more…)