Lorem Ipsum Cakes V2 – Simple Cake Shop Online Order System

Lorem Ipsum Cakes V2 is a simple cake shop online order system using HTML5 and PHP. It simply record client’s orders on your website database and your client can simply chat with you by using WhatsApp, either web version on their desktop devices or mobile phones using installed WhatsApp app.

It’s started with a nice splash screen.
Then you can see the whole order form.
It generates random order number plus order date.
As a client, you enter your name.
Your phone number.
Then choose your preferred cakes.
If your not happy with your choice, you can change it anytime.
For delivery type you can choose between self-collect and normal delivery. If you choose self-collect, you must pick your cakes up yourself. If you choose Normal Delivery, the cake shop will deliver the cakes to you. When you choose Normal Delivery you can enter your address.
Then specify the delivery date and time.
When you click Order Now, you will see a summary of your order. If you are not happy, go ahead and modify your order. If you are happy, click the green button then you are in a WatsApp chat with the cake shop.
Stay tuned for the next video I will show you how to setup this Lorem Ipsum Cakes order system step by step.

Download it here.

How to make a responsive full screen background image in HTML5

Bringing an image to a web page is easy as we can use <img src… tag. But what if we want to use an image as a background image? It is also easy. You can search for it on internet. But, there is more, how to make this background image in full screen mode, center fixed, filling the screen, with maintained aspect ratio, I mean not stretched? The answer is this few lines of css codes:

Switchable “Camera Follows a Player” accross mutliple scenes in Unity

This is a Unity package file, if you download it and import it on your empty Unity project, you will see a demonstration about a camera that follows an object, and this camera (it’s position) is switchable, you can click a button to switch between multiple camera positions and angles. Plus there are two buttons to open two empty scenes, but when you open it the player object and cameras will be there too.

The purpose of this demonstration is to show you how an object like player, camera, etc can be used on multiple scenes without reloading them in each scenes, by adding one line script to make those objects undestroyable when you change scenes.

How to switch between camera positions and angles in Unity by C# script

The script inside this package allows you to switch between camera positions so you can switch between camera angles and positions easily with single click button.

In this example, there were 3 camera positions that we can switch between them. In this video I also tried to add another camera position (the 4th position).

You will also be able to adjust camera switching speed to be fast or slow.

One line PHP code to remove characters except numbers and letters

I found this few lines of PHP script useful to sanitize user input, it removes characters except numbers and letters:

$clean_code = preg_replace('/[^\w]/', '', $string);

Or this one:

$clean_code = preg_replace('/[^a-zA-Z0-9]/', '', $string);

Original post is here: https://coderwall.com/p/bn47ka/remove-all-characters-except-letters-and-numbers-in-php

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

Let’s say we have a website like somewebsite.com 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:

<?php

$url = 'https://somewebsite.com/';
$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 */ }

var_dump($result);

?>

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 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.