I am back! I have Internet access at home again!!!

Sorry for the long absense… I’m back online – This post describes all the bloody details of dealing with Time Warner Cable’s customer service. It’s a rant. You can skip it if you like. But, this is the second time the process was this rocky and I suspect it won’t be the last time… The only good thing we can say is that they are VERY good at appologizing, they offer credit for down time readily and when you get their support reps to your house with the needed equipment, the service is good and the people are polite and compent.

It took Time Warner Cable let’s see….

1 appointment? Nope! That appointment was canceled by them when my wife was checking the mail with out her cell phone and calling TWC back within 5 minutes of the original call counted for nothing. – They are supposed to call 3 times.

2. appointments? Nope! A very angry call from me to a support rep had gotten them to schedule another visit the same day as the first – or at least that’s what I was told.  This person never showed up and the person I spoke to did not record that I’d even called because she thought it was all taken care of. 

3. appointments? Nope! A nice competent worker showed up at the end of the day when he didn’t have enough supplies to correct the problem.  The problem?   The last time they had been to my place to bury the cable line (they didn’t want to have it running through the air because ladders were difficult on my side hill) they most likely knicked the line.  That experience involved many appointments and no records that I’d called and left complaints.

4. appointments? Nope!  Though scheduled for the next day, it seems my job was never given to the contractor.  I got a full months credit out of that call to their support department.

5. appointments? Nope!   The late in the day scheduling – and we SHOULD have been first thing in the morning after all this – meant that thuderstorms had rolled in…  I can’t blame the guy for not wanting to go up the pole with lightning around…

6. appointments?  Almost…  A local contractor came out and re-ran the line.  I like that they are using local small business contractors.

7. appointments?  Maybe…. They have to schedule at least one more visit because the person that ran the line could not bury it.  At least I have the Internet back…  until a squirrel chews through the line tomorrow… 😉

As annoying as it was for me – not having reliable cable internet since July 1, it has been triply so for Denise as for EVERY day except for the 1th and 6th  appointment, she was obligated to constantly be on guard from 8am-8pm for a call from Time Warner knowing that any the 5th ring, could mean another blown appointment.  Additionally, the contractors are not obligated to call… So, she was expected to remain home all day long.  A nice half a month there…

Anyway, I’ll clean up the stuff I’ve been building up for posts and hopefully get something tech related out tomorrow (God willing and the Squirrels don’t arise…).  I’m pretty sure the first thing will be another context menu tool for use in IE.  Then a Xampp tip, another IE tool and by that time I should have some neat Delphi stuff ready for anyone who uses 1and1.com and wants to use their URL for dynamic DNS serving…  Hmmm I should probably make a post of the manual way to do DynDNS through road runner first…. 

Anyway, all that is coming…

WordPress 2.1 Bug Hunt….

This is a post testing WP 2.03 action compared to 2.1

You can see the same action in WP 2.1 here:

http://www.thecodecave.com/21/

And the issue is logged here:

http://trac.wordpress.org/ticket/2918 

 

This should be raw text no link

Here is text again

this is more

 

This text will have an image inserted

SP

between it

This text will have an image inserted

between it and then it will be deleted

 

This text will have an image inserted

SP      

    

 

between it and then it will be resized

 

 

Inserte & deleted and reinserted

SP 

 

 

this is no link

The Oracle: The Lost Secrets and Hidden Message of Ancient Delphi

I was dissapointed that not a word was mentioned about Borland or DevCo in this article… I don’t even see Allen Bauer’s name once!

http://www.findarticles.com/p/articles/mi_m2843/is_3_30/ai_n16418748

The Oracle: The Lost Secrets and Hidden Message of Ancient Delphi
Skeptical Inquirer, May-June, 2006

The Oracle: The Lost Secrets and Hidden Message of Ancient Delphi.
By William J. Broad.
The Penguin Press, New York, 2006. ISBN 1-59420-081-5.304 pp. Hardcover $25.95,

The ancients said the Oracle of Delphi regularly inhaled sacred vapors streaming from the depths of her temple. But in 1892 French archaeologists unearthed the temple and found no evidence of a chasm from which the vapors might have emitted, and after that scholars denounced the Oracle as a fraud. Now the accomplished New York Times science reporter Bill Broad chronicles the investigation by Wesleyan geologist Jelle deBoer and archaeologist John Hale, who eventually determined that the ancient fumes were petrochemical vapors containing a hallucinogenic gas–ethylene–emitted from natural faults hidden beneath the temple floor. Their paper, “New Evidence for the Geological Origins of the Ancient Delphic Oracle (Greece),” was published in Geology in August 2001. Broad entertainingly tells the story of their discovery, weaving in ancient findings and modern philosophical discussions about science and religion. The discovery solves the mystery of how the Oracle got high, yet Broad feels that the larger questions, “the surrounding layers of mystery,” remain. He notes the need for skepticism about psychic powers but argues against overly narrow scientific reductionism that may blind scientists to larger mysteries.

Grrr… Dead cable modem – mostly…

It looks like I’m gonna be mostly offline, at home, until Thursday that’s the soonest RR will be able to come out to diagnose why the internet connection is soooo bad…

In the meantime, sticking the cable modem in the freezer for a time works to get me on line for a bit. I’ve also McGyvered* a cooling fan, from an old dead Pentium 1 computer, onto the side of the cable modem… That seems to help too.

The important thing is that I had enough online time to download last night’s Doctor Who. Anyone else watch it yet? I had to pry my wife’s hands off of the chair… And the kids were yelling, “I’m scared of …” well, you’ll find out what…

(*McGyver was a TV hero in the US that could fix anything with some gum, a toothpick, and a 3 inch piece of string.)

A blast from the past…(so to speak)

I’m not posting because I’ve been thrown into a bit of a panic. I’ll post the reason later tonight.

But I was looking through the humor folder at work for something a friend asked me to find for him, and I stumbled across this…

I don’t know whether this falls under a joke, a time capsule, irony, satire, political commentary, proof against revisionists, or what…

The President is meeting with Saddam Hussein regarding the recent
crisis. They are meeting in Hussein’s Baghdad capital, and halfway
through the meeting Hussein hits a button on his armrest. A fake arm
flies out and hits Clinton in the face.

A little while later he hits another button and Clinton ducks, only to
be kicked in the butt. A while later, this happens again. Clinton is
angry, calls a break, and they decide to meet again later, in
Washington.

When Hussein comes to DC, they sit in Clinton’s office. A few minutes
into the discussions, Clinton hits a button, Hussein ducks, but
nothing happens. A few minutes later, Clinton hits another button, Hussein
ducks again, but still nothing happens. This happens a third time, and
Hussein, by this point, is angry and paranoid.

He gets up and shouts “Enough of this! I’m going back to Baghdad!”

Clinton looks up and displays a funny-looking smirk to the Iraqi
leader. Then quite calmly replies, “What Baghdad?”

Please include your work to support the answer…

Cindy’s comment on my last post reminded me that I did not show any of the routines I tried while trying to figure out how to get the full raw email from the built in PHP imap_ routines.

So, here it is… It is obviously scrap work, but some one might find it useful to have all in one place. Just save this as a php file on your server (some place not shared since you’ll have your email password in it in raw text) and then change the mail server, username and password references (3 of them) to your own. As is, this routine will display a VERY simple webmail reader. It displays a list of messages in your box and the contents of 1 message.

It should give you the groundworks for building something more complex.

However, what it does not include is any part of the TRUE header which is what I pointed out here that I really need.

BTW this routine is OBVIOUSLY NOT safe html. If you display an email that has an embedded code that does nasty stuff, this testing routine will not protect you from it. It is JUST test code. Use it wisely.

[php]
This is just an example of how I research a topic.
‘);
print(‘Therefore it is not fully documented or clean.
It contains code fragments of my own making and those found on the web, who knows where.

‘);
print(‘There are THREE places where you must put in your email server, email username and email password.
‘);
print(‘Otherwise, you will get very limited results.

‘);

function list_emails(){
$MAILSERVER=”{imap.1and1.com:143}”;
// or $MAILSERVER=”{pop.1and1.com:110}”;
// or $MAILSERVER=”{localhost:143}”;
$PHP_AUTH_USER = “YourAddrHere@thecodecave.com”;
$PHP_AUTH_PW = “YOUR_PW_HERE”;

$mbox=imap_open($MAILSERVER,
$PHP_AUTH_USER,
$PHP_AUTH_PW);

print(‘


‘);
print(‘
THIS SECTION REPORTS ON THE FULL MAIL BOX

‘);

echo “Number of Total Emails: ”
.imap_num_msg($mbox);
echo ” Number of Recent Emails: ”
.imap_num_recent($mbox).”

“;
$headers=imap_headers($mbox);
for($x=0; $x < count($headers); $x++) { $idx=($x+1); echo $idx."
$headers[$x]

“;
}
imap_close($mbox);
}

function view_message_num($num){
$MAILSERVER=”{imap.1and1.com:143}”;
// or $MAILSERVER=”{pop.1and1.com:110}”;
// or $MAILSERVER=”{localhost:143}”;
$PHP_AUTH_USER = “YourAddrHere@thecodecave.com”;
$PHP_AUTH_PW = “YOUR_PW_HERE”;

$mbox=imap_open($MAILSERVER,
$PHP_AUTH_USER,
$PHP_AUTH_PW);
$header=imap_headerinfo($mbox,
$num,
180, 180);
print(‘


‘);
print(‘
This is a print_r of the header contents.

‘);
print_r($header);
print(‘


‘);
print(‘
This is a print_r of only the header->from contents.
I wanted to ensure the print_r contained all the info from the subarrays. This text should also be found above.

‘);
print_r($header->from);
print(‘


‘);
print(‘
This is the header info parsed out

‘);
$from = $header->from;
$udate=$header->udate;
$date=Date(“F j, Y, g:i a”, $udate);
echo “Message Number: “. $num.”
“;
$subject= $header->fetchsubject;
if (is_array($from)){
while(list($key, $val) = each($from)) {
echo “From Address: “;
echo $fromaddr=sprintf(“%s@%s”,
$from[0]->mailbox,
$from[0]->host).

“;
echo “Personal : “.
$from[0]->personal.

“;
echo “Adl : “.
$from[0]->adl.

“;
echo “Mailbox : “.
$from[0]->mailbox.

“;
echo “Host : “.
$from[0]->host.

“;
echo “Subject : “.
$subject.

“;
echo “Date : “.
$date.

“;
echo “To Address : “.
$header->toaddress.



“;
}
}

print(‘


‘);
print(‘
This is a print_r of the results of a fetchstructure

‘);
$mid = $num;
$struct = imap_fetchstructure($mbox, $mid);
print_r($struct);
$parts = $struct->parts;
$i = 0;

if (!$parts)
{
/* Simple message, only 1 piece */
$attachment = array(); /* No attachments */
$content = imap_body($mbox, $mid);
}
else
{
/* Complicated message, multiple parts */

$endwhile = false;

$stack = array(); /* Stack while parsing message */
$content = “”; /* Content of message */
$attachment = array(); /* Attachments */

while (!$endwhile)
{
if (!$parts[$i])
{
if (count($stack) > 0)
{
$parts = $stack[count($stack)-1][“p”];
$i = $stack[count($stack)-1][“i”] + 1;
array_pop($stack);
}
else
{
$endwhile = true;
}
}

if (!$endwhile)
{
/* Create message part first (example ‘1.2.3’) */
$partstring = “”;
foreach ($stack as $s)
{
$partstring .= ($s[“i”]+1) . “.”;
}
$partstring .= ($i+1);

if (strtoupper($parts[$i]->disposition) == “ATTACHMENT”) { /* Attachment */
$attachment[] = array(“filename” => $parts[$i]->parameters[0]->value,
“filedata” => imap_fetchbody($mbox, $mid, $partstring));
}
elseif (strtoupper($parts[$i]->subtype) == “PLAIN”)
{ /* Message */
$content .= imap_fetchbody($mbox, $mid, $partstring);
}
}

if ($parts[$i]->parts)
{
$stack[] = array(“p” => $parts, “i” => $i);
$parts = $parts[$i]->parts;
$i = 0;
}
else
{
$i++;
}
} /* while */
} /* complicated message */

print(‘


‘);
print(‘
This is a print_r of the results of the entire content of the email turned into an array as offered by RJ
NOTE: THIS MIGHT NOT BE SAFE HTML

‘);
print_r($content);

print(‘


‘);
print(‘
This is a print_r of the body in text format. This in theory should be included above, but this is quote protected.

‘);
$Body_text = quoted_printable_decode($content);
print_r($Body_text);

imap_close($mbox);
}

/*********************************************************************************/
/* Calling routines */
/*********************************************************************************/
list_emails();
if (!isset($num)) {
$num =1;
}
view_message_num($num);
?>



type!=0){
//DECODE PART
//decode if base64
if ($p->encoding==3)$part=base64_decode($part);
//decode if quoted printable
if ($p->encoding==4)$part=quoted_printable_decode($part);
//no need to decode binary or 8bit!

//get filename of attachment if present
$filename=”;
// if there are any dparameters present in this part
if (count($p->dparameters)>0){
foreach ($p->dparameters as $dparam){
if ((strtoupper($dparam->attribute)==’NAME’) ||(strtoupper($dparam->attribute)==’FILENAME’)) $filename=$dparam->value;
}
}
//if no filename found
if ($filename==”){
// if there are any parameters present in this part
if (count($p->parameters)>0){
foreach ($p->parameters as $param){
if ((strtoupper($param->attribute)==’NAME’) ||(strtoupper($param->attribute)==’FILENAME’)) $filename=$param->value;
}
}
}
//write to disk and set partsarray variable
if ($filename!=”){
$partsarray[$i][attachment] = array(‘filename’=>$filename,’binary’=>$part);
$fp=fopen($filestore.$filename,”w+”);
fwrite($fp,$part);
fclose($fp);
}
//end if type!=0
}

//if part is text
else if($p->type==0){
//decode text
//if QUOTED-PRINTABLE
if ($p->encoding==4) $part=quoted_printable_decode($part);
//if base 64
if ($p->encoding==3) $part=base64_decode($part);

//OPTIONAL PROCESSING e.g. nl2br for plain text
//if plain text

if (strtoupper($p->subtype)==’PLAIN’)1;
//if HTML
else if (strtoupper($p->subtype)==’HTML’)1;
$partsarray[$i][text] = array(‘type’=>$p->subtype,’string’=>$part);
}

//if subparts… recurse into function and parse them too!
if (count($p->parts)>0){
foreach ($p->parts as $pno=>$parr){
parsepart($parr,($i.’.’.($pno+1)));
}
}
return;
}

//open resource
$MAILSERVER=”{imap.1and1.com:143}”;
// or $MAILSERVER=”{pop.1and1.com:110}”;
// or $MAILSERVER=”{localhost:143}”;
$PHP_AUTH_USER = “YourAddrHere@thecodecave.com”;
$PHP_AUTH_PW = “YOUR_PW_HERE”;

$link=imap_open($MAILSERVER,
$PHP_AUTH_USER,
$PHP_AUTH_PW);

$msgid = 2;
//fetch structure of message
$s=imap_fetchstructure($link, $msgid);
print_r($s);
die();
//see if there are any parts
if (count($s->parts)>0){
foreach ($s->parts as $partno=>$partarr){
//parse parts of email
parsepart($partarr,$partno + 1);
}
}

//for not multipart messages
else{
//get body of message
$text=imap_body($link,$msgid);
//decode if quoted-printable
if ($s->encoding==4) $text=quoted_printable_decode($text);
//OPTIONAL PROCESSING
if (strtoupper($s->subtype)==’PLAIN’) $text=$text;
if (strtoupper($s->subtype)==’HTML’) $text=$text;

$partsarray[‘not multipart’][text]=array(‘type’=>$s->subtype,’string’=>$text);
}
print(‘


‘);
print(‘
This is a print_r of another method of getting the complete parts of the email. This is the parts array.

‘);
print_r($partsarray);
?>
[/php]

I’m still here and working on new plugins…

It’s been nutso at work since I got back and I’ve been researching a new idea too. So, I’ve not had time for posting. But I will share with you some of what’s caught my attention.

I have two plug-ins I am working on. One is in the EARLY testing phase. It’s called No-More-404. It allows all of the permalink structures you used before to be handled and not present 404 errors. I would like it to present 301 (moved/redirect) messages and point you to the correct structure, but right now I haven’t found an elegant way of doing that. The plugin is toooo top heavy if I build in all of the routines I would need to use using the method I have right now. So, it looks like version 1 of the plugin will simply allow multiple permalink structures for the initial link to your site. Google frowns on that, but it is better than everyone getting 404 errors. After they click (or crawl)on another link, the new structure will be used. But it would be better if I could force it to the official structure.

I am also working on a DNSBL routine that may become a WP plugin or maybe a VB plugin as well. Basically it will block spams based up on the IP address used to send the message. It would be strange to have WP manage your spam, but as long as both VBulletin and WordPress have Cron ablities, it will work for someone that does not have shell access to their host.

But I ran across a technical problem yesterday and it vexed me. I think I have it solved though. Some of you may find this interesting so, I’ll provide part of the conversation I’ve had over at http://www.codingforums.com/showthread.php?t=89994. Besites I am soooo light on words lately…

PHP Imap_blah function to retrieve full Internet header


I’ll switch over to the pear library if need be, but I CANNOT believe the built in php functions don’t do what I want them to do.

I can use imap_header to get the basic "to" and "from" stuff in emails. They give the "typical end user" level of info about the origin of the email. However, what I want retrieve is the ip address of the smtp server that processed the email. That information is included in EVERY email and is available from IMAP servers (at least it is available to Outlook because you can right click on an email and choose options to see it).

I cannot find an IMAP_BLAHBLAHBLAH function that either returns this info or returns the full raw text of the message. I need the email’s Internet headers. This stuff:

Quote:

Return-Path: <tkuhnel@alushiptechnology.com>
Delivery-Date: Mon, 26 Jun 2006 23:53:47 -0400
Received-SPF: none (mxus6: 74.139.17.40 is neither permitted nor denied by domain of alushiptechnology.com) client-ip=74.139.17.40; envelope-from=tkuhnel@alushiptechnology.com; helo=Laskowski6;
Received: from [74.139.17.40] (helo=Laskowski6)
by mx.perfora.net (node=mxus6) with ESMTP (Nemesis),
id 0MKvMg-1Fv4dv28vt-0006m9 for *@thecodecave.com; Mon, 26 Jun 2006 23:53:47 -0400
From: "Adam Field" <tkuhnel@alushiptechnology.com>
To: <*@thecodecave.com>
Subject: RICARDO examined BENJAMIN of a please
Date: Tue, 27 Jun 2006 03:53:44 +0480
MIME-Version: 1.0
Content-Type: multipart/related;
type="multipart/alternative";
boundary="—-=_NextPart_000_006A_01C69962.9CE1DB50"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2670
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
Message-ID: <0MKvMg-1Fv4dv28vt-0006m9@mx.perfora.net>
Envelope-To: *@thecodecave.com

But all I get from imap_headerinfo is this stuff :
$header=imap_headerinfo($mbox,
$num,
180, 180);
print_r($header);

Quote:

stdClass Object ( [date] => Tue, 27 Jun 2006 03:53:44 +0480 [Date] => Tue, 27 Jun 2006 03:53:44 +0480 [subject] => RICARDO examined BENJAMIN of a please [Subject] => RICARDO examined BENJAMIN of a please [message_id] => <0MKvMg-1Fv4dv28vt-0006m9@mx.perfora.net> [toaddress] => [to] => Array ( [0] => stdClass Object ( [personal] => [mailbox] => brian [host] => thecodecave.com ) ) [fromaddress] => "\"Adam Field\"" [from] => Array ( [0] => stdClass Object ( [personal] => "Adam Field" [mailbox] => tkuhnel [host] => alushiptechnology.com ) ) [reply_toaddress] => "\"Adam Field\"" [reply_to] => Array ( [0] => stdClass Object ( [personal] => "Adam Field" [mailbox] => tkuhnel [host] => alushiptechnology.com ) ) [senderaddress] => "\"Adam Field\"" [sender] => Array ( [0] => stdClass Object ( [personal] => "Adam Field" [mailbox] => tkuhnel [host] => alushiptechnology.com ) ) [Recent] => [Unseen] => [Flagged] => [Answered] => [Deleted] => D [Draft] => [Msgno] => 1 [MailDate] => 27-Jun-2006 03:53:47 +0000 [Size] => 12651 [udate] => 1151380427 [fetchfrom] => "Adam Field" [fetchsubject] => RICARDO examined BENJAMIN of a please )

The imap_body requests provide no more info with the default parameters.

I suspect the quotes I’ve provided here are more info than is needed for anyone that knows the answer, but I wanted to be clear about what I was asking.

So, how do I get that Received-SPF or Recieved info?

If this is not possible, is PEAR my best bet or do I have to go old school on this thing and communicate with it via FTP or telnet?

Input is appreciated!

A reply:

to find the SMTP address, would it not be as easy as extracting the hostname from the sender’s email address, and converting it to an IP address if necessary with gethostbyname() (http://us2.php.net/manual/en/function.gethostbyname.php)?

My Response:

Unfortunately, it is rarely that simple.

Take for example that address on the spam I quoted earlier. tkuhnel@alushiptechnology.com was used as the sender. However, that address is probably some innocent business man that had their email address plastered into several thousand spam emails.

Alushiptechnology.com evaluates to 62.233.142.37. That is very different from the address of the SMTP server that we see in the email 74.139.17.40. Additionally, since shared servers have become more common, it is not at all unusual for the SMTP server to be a common server – say smtp.lunarpages.com and the website url/email address to be on a totally different server like Support@codingforums.com.

So, unfurtunately, all things being equal, gethostbyname() is a good idea that won’t work in this situation. However, if we were to check on the IP address of the SMTP server, we can tell that it is blocked. Here is one of the places I would check: http://www.spamcop.net/w3m?action=ch…=74.139.17.40+

I’ll see if PEAR has a solution for me. But I still find it hard to believe that this info is not available from the built in functions that otherwise seem so robust!

If any of my readers have any other suggestions, your input would be much appreciated too!!!

Tags allowed in WordPress Comments & Posts

There have been some comments on the WP support forum asking what tags are allowed in WP comments.

If you are a user of the editor or author security levels with unfiltered HTML rights, you are technicially allowed to enter any HTML tags.

Otherwise, these are comment tags that are allowed by the filtering engine used by WordPress (KSES):

  • address
  • a
    • href
    • title
    • rel
    • rev
    • name
  • abbr
    • title
  • acronym
    • title
  • b
  • big
  • blockquote
    • cite
  • br
  • button
    • disabled
    • name
    • type
    • value
  • caption
    • align
  • code
  • col
    • align
    • char
    • charoff
    • span
    • valign
    • width
  • del
    • datetime
  • dd
  • div
    • align
  • dl
  • dt
  • em
  • fieldset
  • font
    • color
    • face
    • size
  • form
    • action
    • accept
    • accept-charset
    • enctype
    • method
    • name
    • target
  • h1
    • align
  • h2
    • align
  • h3
    • align
  • h4
    • align
  • h5
    • align
  • h6
    • align
  • hr
    • align
    • noshade
    • size
    • width
  • i
  • img
    • alt
    • align
    • border
    • height
    • hspace
    • longdesc
    • vspace
    • src
    • width
  • ins
    • datetime
    • cite
  • kbd
  • label
    • for
  • legend
    • align
  • li
  • p
    • align
  • pre
    • width
  • q
    • cite
  • s
  • strike
  • strong
  • sub
  • sup
  • table
    • align
    • bgcolor
    • border
    • cellpadding
    • cellspacing
    • rules
    • summary
    • width
  • tbody
    • align
    • char
    • charoff
    • valign
  • td
    • abbr
    • align
    • axis
    • bgcolor
    • char
    • charoff
    • colspan
    • headers
    • height
    • nowrap
    • rowspan
    • scope
    • valign
    • width
  • textarea
    • cols
    • rows
    • disabled
    • name
    • readonly
  • tfoot
    • align
    • char
    • charoff
    • valign
  • th
    • abbr
    • align
    • axis
    • bgcolor
    • char
    • charoff
    • colspan
    • headers
    • height
    • nowrap
    • rowspan
    • scope
    • valign
    • width
  • thead
    • align
    • char
    • charoff
    • valign
  • title
  • tr
    • align
    • bgcolor
    • char
    • charoff
    • valign
  • tt
  • u
  • ul
  • ol
  • var