Skip to content

Instantly share code, notes, and snippets.

MIME-Version: 1.0
Received: by 10.220.191.194 with HTTP; Wed, 11 May 2011 12:27:12 -0700 (PDT)
Date: Wed, 11 May 2011 13:27:12 -0600
Delivered-To: jncjkq@gmail.com
Message-ID: <BANLkTi=JCQO1h3ET-pT_PLEHejhSSYxTZw@mail.jncjkq.com>
Subject: Test
From: Bill Jncjkq <jncjkq@gmail.com>
To: bookmarks@jncjkq.net
Content-Type: multipart/mixed; boundary=bcaec54eecc63acce904a3050f79
@billsinc
billsinc / catcher.php
Created May 11, 2011 22:48
Parse emails with attachments
#!/usr/bin/php
<?php
//debug
#ini_set ("display_errors", "1");
#error_reporting(E_ALL);
//include email parser
require_once('/var/www/rfc822_addresses.php');
require_once('/var/www/mime_parser.php');
@billsinc
billsinc / gist:768675
Created January 6, 2011 21:56
Date format for import
mmm d, yyyy hh:mm:ss AM/PM
@billsinc
billsinc / Remove content from Drupal
Created December 17, 2010 00:26
Remove content from Drupal by content type
$node_type = 'lease';
//fetch the nodes we want to delete
$result = db_query("SELECT nid FROM {node} WHERE type='%s'",$node_type);
while ($row = db_fetch_object($result)){
node_delete($row->nid);
$deleted_count+=1;
}
//simple debug message so we can see what had been deleted.
drupal_set_message("$deleted_count nodes have been deleted");