Categories
PHP

Codeigniter 3 and PHP 8.0 / 8.1 Compatibility

Codeigniter 3.1.12 (and above) now supports PHP 8.0 / 8.1.

Latest Codeigniter 3 version now is 3.1.13.

If you use Codeigniter older than 3.1.12, and you use PHP 8.0 / 8.1, then i suggest you to upgrade to the latest Codeigniter 3.

Categories
PHP Programming

Use Mailgun Plain PHP Curl Code

Mailgun is one of some services to send e-mail. It has a nice PHP library here. But for some reason, it only works in my local server, and it does not work at all in remote server and the code returns “Mailgun server is not reachable” error (although i have tried to disable server firewall, which was not a best decision).

Categories
PHP Programming

How to Use Midtrans-PHP in CodeIgniter 3

Here is how to use Midtrans-PHP official library in Codeigniter 3 🙂

Categories
PHP Programming

Bitmex PHP API Example

If you are looking for bitmex API example using PHP, you can use this code 🙂
https://github.com/xrvel/xrvel-bitmex-api-php

Categories
PHP Programming

Fix WordPress Cloudflare HTTPS Redirect Loop

If you use Cloudflare flexible SSL certificate to use HTTPS, in some case you may get redirect loop.

I believe it is caused because WordPress does not recognize the “fake” SSL certificate.

Fixing it is simple.

Open your wp-config.php file, and find this first line

<?php
Categories
PHP Programming

Integrate reCAPTCHA v2 Into Pligg

Pligg supports some CAPTCHA, including Solve Media, and old reCAPTCHA.
Now i will write how to use reCAPTCHA v2 (click captcha) into Pligg.

First, you must get Google reCAPTCHA keys.
Second, open your Pligg admin, set the site & secret key under “CAPTCHA” sub menu and click “configure” next to reCAPTCHA.

Categories
PHP

How to Fix WARNING: Creating default object from empty value

You may encounter this “warning” message when using PHP 5.4 or above

E_WARNING: Creating default object from empty value

Here is how to fix this 🙂

Categories
PHP Programming Wordpress

Change WooCommerce Items Per Page

To change displayed WooCommerce Items Per Page, add this code to any PHP file (end of “woocommerce.php” / your theme functions.php, etc)

// Woo commerce 9 items per page
add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 9;' ), 20 );
Categories
PHP Programming

PHP HtmlEntities for UTF-8 Characters

If you just use simple PHP htmlentities function with one argument, you will notice that when you pass string that contains UTF-8 characters, the result is incorrect leaving you with some incorrect characters on the result.

To use it correctly, use this code 🙂

htmlentities($your_string, ENT_COMPAT, 'UTF-8');
Categories
PHP Programming

My Proxy List Script and ProxyNoid

I made a free proxy list script about 1-2 years ago which is called “proxycoder script”.
I haven’t continued to develop it for a long time. Recently Oxuro, owner of ProxyNoid.com contacted me at DigitalPoint and told me that he has done some modification to my script. He kindly asked if i can include his modification on the next proxycoder script or if i can give him permission to distribute his modified script. I chose the second choice, i will be happy to see my script to become a well developed proxy list script.
From now, i give permission to ProxyNoid.com to distribute the modified version of my script.

Good luck, Oxuro 🙂