View .htaccess
# Ok I'm hoping someone might be able to help. Here's the final require scenario
# 1. If someone tries to visit either or it should take them to
# 2. But only if they're from two certain IP ranges (our internal IP ranges).
# 3. It might only be if it's like ''... if the user requests something further like '' it needs to go that that page.
# Background
# It's on a Wordpress Multisite install hence why there's more than one domain that could be request to the same doc_root
# I'm putting this above the Wordpress htaccess stuff, so that it picks it up before trying to compute Wordpress redirects.
View Button
<a target="_blank" href="" style="color:#0c223f;background-color:#ffc627;border-color:#f3b300;padding:5px 10px;font-size:1.2em;line-height:1.5;border-radius: 3px;display: inline-block;text-align: center; border-width: 1px;border-style: solid;text-decoration:none;vertical-align: middle;">Visit:</a>

Hello web people, hoping you can help!

I have an weird thing happening with sending emails through the mail() function in PHP on my server.

It's sending to fine to all addresses apart from the domain which is attached to the website I'm running on the server. (That domain uses Google Apps for their Email)

It's not a blanket Google issue, as it sends fine to address, and even to other Google Apps domain addresses. Just that one.

I've set up the SPF record - seemingly no help!

View dbeonnect.php
// Database Connection Stuff
define('DB_HOST', 'localhost');
define('DB_USER', 'user');
define('DB_PASSWORD', 'password');
define('DB_NAME', 'databasename');
// Global Definitions that are needed for both entry and judging system
define('GROUP_INCLUDES_PATH', '/var/www/html/webvid-awards/group-includes/');
define('PATH_TO_JUDGING', '/var/www/html/judging/');
define('PATH_TO_ENTRIES', '/var/www/html/entries-dev/');


This class is quick and simple to install into any PHP application, and is easy to customise to the display you require.

The script finds the amount of total disk space on your system, and then the total free space. We then calculate the used space and give it to you as a percentage.


This class was developed by Fred Bradley -

Setting the path to check

You can choose the path of the disk that you want to check (if you have multiple disks mounted, for example). You can do this by setting the first paramater when calling calling the Class to the directory that you want to check. EG: $disk = new DiskSpaceCheck('/var/www/vhosts/');

# This script is used for create virtual hosts on CentOs.
# Created by alexnogard from
# Improved by mattmezza from
# Feel free to modify it
# $usr - User
# $dir - directory of web files
# $servn - webserver address without www.
View gist:483aa7a6b0de46a6d7d8
<input type="hidden" name="instId" value="213881">
<input type='hidden' name='accId1' value='CATCH'>
<input type="hidden" name="cartId" value="1430823944"><!-- This is a unique identifier It's actually a UNIX Timestamp! -->
<input type="hidden" name="award_id" value="21" />
<input type="hidden" name="invoice_amount_inc_tax" value="342" />
<input type="hidden" name="invoice_amount_ex_tax" value="285" />
<input type="hidden" name="MC_entries[]" value="e87z0xvf" />
<input type="hidden" name="amount" value="342" />
<input type="hidden" name="currency" value="GBP"><!-- Choose appropriate currency that you would like to use -->
<input type="hidden" name="desc" value="Entry/Entries for The PR Week Awards 2015" />
View class.FBcsv.php
* FBputcsv class.
class FBcsv {
private $filename;
private $fp = false;
View Read Me for Student Radio Theme
<div class="readme file wiki-content">
<h1 id="markdown-header-student-radio-association-wordpress-installation">Student Radio Association Wordpress Installation</h1>
<p>Welcome! This is the repo for all the custom scripting of the Student Radio Association's website (Version 3 "Wordpress").</p>
<h3 id="markdown-header-history">History</h3>
<p>The <a href="">SRA</a> started development of this project with Jason Slack (then Web Officer) building the initial template in 2013. Development halted for a period at the end of 2013. This was then picked up again by Fred Bradley, adapting Jason's original theme to bring it more inline with core Wordpress functionality and adding some new development practices to help aide faster progress.</p>
<h3 id="markdown-header-development-principles">Development Principles</h3>
<h4 id="markdown-header-the-basic-rules">The Basic Rules</h4>
<li>Comment as much as possible, so your gran could understand what the cod
View fb_format_twitter_handle
* How this works: While writing content in the Wordpress editor. Simply add a twitter handle without a link but with the @ symbol.
* EG: "Here is some content written by @FredBradley" would turn into "Here is some content written by <i class="fa fa-fw fa-twitter"></i><a href="">@FredBradley</a>"
* Notes: For this snippet to work 100% as intended it requires two things.
* 1. You need to have Font Awesome working on your site. (
* 2. You need to have called the Twitter Widgets.js javascript for Web Intents to work. More details here:
* How to implement: Simply add this snippet into your theme's functions.php file!