How to send POST request to another website from a PHP script

Let’s say we have a website like and there is an input form, but we don’t want to submit that form from that website, instead we send POST request to that page from another website. Here is a handy PHP script to do so:


$url = '';
$data = array('key1' => 'value1', 'key2' => 'vaue2');

$options = array(
    'http' => array(
        'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
        'method'  => 'POST',
        'content' => http_build_query($data)
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }



Save Android Webview Content as PDF File

Hello everybody!

What you are seeing here is an Android app that shows a local html file inside a Web View.

Then on top of the web view there is a button to save web view contents as a pdf file.

Pdf file is saved localy after you tapped the button and you can open it using your favorite pdf viewer app in your phone.

How to make objects facing towards player in Unity

Some of elements in our game probably need to always face towards the player or player’s camera.

With this script we can make any object that this script attached on it, to look at a specific object, like player object or a camera.

How to open WebP images in Photoshop – WebP Photoshop Plugin

Finally this plugin solved my problem. Usually when I got a webp images downloaded from internet, I take a screenshot of the image and copy and paste it inside Photoshop.

But lucky me I found this plugin from this link:

Extract the file, and find 32 or 64 plugin file, copy and paste it on your Photoshop plugin directory. Enjoy!

How to make and generateQR Code with JavaScript – Center Align the QR Code

This tutorial is answering a question about how to center align the qr code image generated by qrcode.js library on my previous video:

And the answer is relatively easy, we can adjust the styling of the div containing qr code image to make it center aligned.

You can download the library from here:

qrcode.js library is very simple and useful JavaScript library that can help you generate qr code images easily.

You can dowload the source code here:

How to resize QR Code image generated by phpqrcode library

In this tutorial I will show you how to modify the phpqrcode library to generate more bigger and larger QR Code image.

By default if we generate a QR Code of short text or string, we will get a small QR Code image approximately less than 100 pixels. But we can multiply by any number we like.

How to make an HTML5 Note Taking Program

HTML5 is amazing to me it and I have fun to do coding with JavaScript because it runs on web browser just like that, so we don’t have to install anything, its just running on web browser.

In this tutorial I will share with you how to create a web program, this time, a note taking program.

By watching this tutorial you will know how to store note data, how to retrieve it back and how to delete each one of notes we saved.

We don’t use any database to make this note taking program, we only use what so-called Local Storage on web browser, so our notes are saved on web browser.

Adding html file inside assets folder (Creating HTML5 Android WebApp)

Now we are ready to add our html file inside assets folder. Create a folder named assets and put your html file there. Then build the app. You will see your app is running displaying that html page.

This code is for html sample page used in this tutorial:

<!DOCTYPE html>
		<title>LightWeight NoteTaker</title>
		<p>This is a LightWeight NoteTaker HTML5 Android app</p>

Edit the file (Creating HTML5 Android WebApp)

The next step is to edit file. Copy and paste this code to your MainActivity, but remember keep your package name unchanged, my package name is “com.thirteenov.lightweightnotetaker” so you must your own package name as it is your unique app identifier.

package com.thirteenov.lightweightnotetaker;


import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends AppCompatActivity {

    WebView browser;

    protected void onCreate(Bundle savedInstanceState) {



        browser = findViewById(;
        browser.setWebChromeClient(new WebChromeClient());


        browser.setWebViewClient(new WebViewClient() {
            public boolean shouldOverrideUrlLoading(WebView viewx, String urlx) {
                    return false;
                    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(urlx));
                    return true;

    public boolean onKeyDown(int keyCode, KeyEvent event) {
        WebView browser = findViewById(;
        if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; browser.canGoBack()) {
            //if Back key pressed and webview can navigate to previous page
            // go back to previous page
            return true;
        return super.onKeyDown(keyCode, event);