American Censorship Day November 16 – Join the fight to stop SOPA.
Today, Congress holds hearings on the first American Internet censorship system.
This bill can pass. If it does the Internet and free speech will never be the same.
Join all of us to stop this bill.
Author Archives: dropdeaddick
Kayako API: How to Post a Ticket
A basic PHP example of how to post a new ticket via the Kayako v4 Rest API
<?php
$apiUrl = "https://support.domain.com/api/index.php?e=/Tickets/Ticket";
$apiKey = "78db96b0-1t7c-aea4-bd51-7xf39d50cdd6";
$salt = mt_rand();
$secretKey = "ZjBiZS0N2MtMzM3MTkyNTkxMjdiZWZkMGIjE3YmJiMGUtNmY0MC0yNWU0LWY5x6DktN1NzE0LWMxMGYyZDIzOThmYjY5YT7m";
$signature = base64_encode(hash_hmac('sha256',$salt,$secretKey,true));
$subject = "Test Ticket";
$fullname = "DropDeadDick";
$email = "test@domain.com";
$contents = "Test test test test";
$departmentid = "1";
$ticketstatusid = "1";
$ticketpriorityid = "1";
$tickettypeid = "1";
$staffid = "1";
$post_data = array('subject' => $subject,
'fullname' => $fullname,
'email' => $email,
'contents' => $contents,
'departmentid' => $departmentid,
'ticketstatusid' => $ticketstatusid,
'ticketpriorityid' => $ticketpriorityid,
'tickettypeid' => $tickettypeid,
'staffid' => $staffid,
'apikey' => $apiKey,
'salt' => $salt,
'signature' => $signature);
$post_data = http_build_query($post_data, '', '&');
$curl = curl_init($apiUrl);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_URL, $apiUrl);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
$response = curl_exec($curl);
curl_close($curl);
$xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA);
echo "<pre>".print_r($xml, true)."</pre>";
?>
cPanel – Fix Ownership of /home/user
I recently had an issue with incorrect ownership of all files under /home/user/ due to mismatched UIDs after a cPanel server restore. The following script took care of this in no time.
echo -e "Checking ownership of /home/user \n"
for i in `ls /var/cpanel/users/`
do
if [ "$i" != "root" ]; then
chown -R $i:$i /home/$i
chown $i:nobody /home/$i/public_html /home/$i/.htpasswds
chown $i:mail /home/$i/etc /home/$i/etc/*/shadow /home/$i/etc/*/passwd
echo $i
fi
done
WordPress for Android
Testing WordPress for Android via Droid X.
You can scan the code below to download WordPress for Android.

cPanel Webmail Direct Login Script
A simple and configurable script for direct login to the cPanel webmail applications(Horde, SquirrelMail, RoundCube).
<?php
// Modified version of the standard cPanel login page to allow direct login to a specific webmail application.
// Must set $host , $login_path , and $mail_app, defaults to cPanel proxy subdomains and SquirrelMail
$host = 'example.com';
// Uncomment one of the following to set login URL type
View full script
cPanel Email Filter for IP Range
I recently needed to block a large amount of incoming email via IP range in cPanel for a single account versus blocking the IP range on the entire server. This was accomplished using cPanel’s Account Level Filtering for Mail.
Here is the filter setting using 192.168.0.0/24 as an example.
Rules:
Any Header
matches regex
192\.168\.{1,3}\.{1,3}
Action:
Discard Message
Snowing in Houston
It’s snowing here in Houston today! We don’t see snow that often here and it sure doesn’t compare to the snow when I am up in Michigan. However it is a welcome change and distraction from the normal Texas weather. It is expected to continue though the rest of the day and we may actually see more than 2 inches. I don’t mind at all, just gives me a reason to kick the dodge into 4 wheel drive.
Bookworm Addiction
I seemed to have a new found addiction to Bookworm. This is not a new game to me but I recently installed in on my notebook and can’t seem to stop playing it.
To make matters worse, Sharlet of SharletsWorld.com has been taunting me about my scores. I think I have her beat with my new score(3,452,580), but I really don’t see this ending well for me.
Edible Arrangement
My New “Desk”
My job requires a lot of hours at the keyboard, so I decide to swap my desk for something a bit more comfortable. After a little searching I opted for a recliner and a LCD stand.
To round out the setup, I tossed in a wireless keyboard, wireless mouse, and a nice lap board. My only complaints so far are that the stand is held in place by the weight of the recliner and I hate the keyboard. However, I have yet to knock it over and have pre ordered the new Logitech K340 compact keyboard.




