What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-02-25 03:15:09
wp varnish ip
//Add at the top of wp-config.php $temp_ip = explode(',', isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : (isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] : $_SERVER['REMOTE_ADDR'])); $remote_addr = trim($temp_... Add solution -
PHP 2022-02-24 17:05:02
how to make a sign-up database
<?php session_start(); // initializing variables $username = ""; $email = ""; $errors = array(); // connect to the database $db = mysqli_connect('localhost', 'root', '', 'registration'); // REGISTER USER if (isset($_POST['reg... Add solution -
PHP 2022-02-24 14:30:02
how to programmatically set a cron job in php
//The stackoverflow link with detailed explanation https://stackoverflow.com/questions/23544851/how-to-set-up-a-cron-job-programmatically // Create a cron job require_once 'xmlapi.php'; /* * Instanciate the class, setting up username/password/IP * @... Add solution -
PHP 2022-02-23 04:20:02
magento 2 result page factory create object
app/code/Pbritka/HelloWorld/Controller/Page/Index.php <?php namespace Pbritka\HelloWorld\Controller\Page; class Index extends \Magento\Framework\App\Action\Action { protected $_pageFactory; public function __construct(\Magento\Framework\Vie... Add solution -
SQL 2022-02-22 18:25:03
sql to mongodb query converter
The simple anwser? No. The slightly more complex anwser is some people have had luck translating more complex SQL to Mapreduce functions ... http://rickosborne.org/blog/index.php/2010/02/08/playing-around-with-mongodb-and-mapreduce-functions/ http://ri... Add solution -
Shell/Bash 2022-02-22 10:00:01
plugin custom code to install another plugin
// Include required libs for installation require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); require_once( ABSPATH . 'wp-admin/includes/class-wp-ajax-upgrader-skin.php' );... Add solution