<meta property="fc:frame" content="vNext" /> <meta property="fc:frame:image" content="https://blog.flashsoft.eu/images/og/default-og-blog-opt.webp" /> <meta property="fc:frame:post_url" content="https://blog.flashsoft.eu/fc-frame-handler" /> <meta property="fc:frame:button:0:post_redirect" content="Visit Page" /> <meta property="fc:frame:button:0:action" content="link" /> <meta property="fc:frame:button:0:target" content="https://blog.flashsoft.eu/tag/code-example/page/4" /> <meta property="fc:frame:button:1" content="About Author" /> <meta property="fc:frame:button:2" content="About Blog" /> <meta property="fc:frame:button:3" content="Support Blog" />

Tag Code Example

Fast way to set up a form with PHPMailer and Ajax

PHPMailer is a popular library for sending emails as the project of the title suggests. In GitHub, the readme file has a nice example of a basic setup, but today I'll give you a similar simple example using jQuery, Swal( Sweet alert ).

So first this is the PHP script that should respond to an ajax request (for example a file named smail.php):

<?php error_reporting(0); // Import PHPMailer classes into the global namespace // These must be at the top of your script, not inside a function use PHPM...
View full article

Ionic 2 overwrite back button function my way

I guess that most APP developers would not prefer a crude exit of their APP when the back button was pressed, and as you may already know using ionic you can register a callback on the back button pressed event. That is pretty straightforward, but what comes in the registered callback is mostly a matter of preference, but nevertheless, this method that I lately used works on the newest 3.1.1 Ionic version.
I will explain in just two phrases, what is the expected behavior:

The first thing that it...

View full article

How to implement a CAPTCHA for Google Forms

Is it possible to make a random captcha for a google form? You may search and find on google groups and other sources a hard no to this question but, in fact, there is one method that I made that works pretty well. Unfortunately, there are some catches with the method that I am about to show you, but until we get to that, we first have to ensure that we can meet a requirement that this method has. This primary requirement is an URL/server that can generate dynamically a captcha image from a gi...

View full article

PHP Class for modifying old HTML static copies / mirrors

Ok you made a static mirror(maybe with HTTrack, maybe with something else) and you still want to host it somewhere, but you also want to make a change to all the static pages without modifying each and every one of the files. In that case, you need to load that file using a script that reads the file at the time of loading then makes the changes you want and after that displays it. Sound simple enough so I made a PHP class that does just that and I even wrote 2 flavors of the script to work on ...

View full article