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 );