Category: Code
This area of the site is dedicated to code snippets for quick and easy reference
PHP CLI – Create WordPress Username
Currently this code only creates a subscriber user in WordPress. Due to security concerns I likely won’t work on this to make it do greater permissions.
MySQL – Get Max Length of Column
Similar to Max Length of Data In Column – MSSQL this query will do the same for MySQL Replace host (column) along with hosts (table) with what you’d like to check
Connect to SSH from Terminal
When on a UNIX based computer you can connect to another terminal via SSH using this command The -p defines the port, while 22 is the default port for SSH some servers change their port to ward off potential hackers. Make sure you know what the port number is before…
PHP CLI – Restrict to CLI Only
Sometimes it’s easier to run a PHP script than to run a UNIX bash/shell script, this code below will require the use of PHP CLI and prevent it from running in a web browser. Typically a good idea to place the PHP file out of the web directory as well….
PHP WordPress – Use Radius Server Login
Securing WordPress with Radius Server login. This project was created in mind to help secure WordPress but allow users an easier way to securely login without having to have a really long password to remember. While I do not go into creating the Radius server you can go to http://www.radiusdesk.com/getting_started/install_ubuntu_nginx…
PHP – OpenSSL AES Encryption
This is currently setup as a three file setup, I can not remember where I originally found the code so I can not take full credit for this post. I use the code below to send a username and date\time to another page. If the date\time is within 2 minutes…