Hot Koehls
  • Email
  • Feedburner
  • Linkedin
  • Twitter
  • Home
  • About
  • Archives
  • Contact
  • Software
    • S3imple Backup
    • Twitter Feed Archiver
    • FileTime
    • Flickr API Demo
Search
Home» Posts tagged "php"

Posts tagged "php"

Get domain out of any URL string (yes, really)

Posted by Frank - October 27, 2009 - For techies
0

It’s a common problem with no single right answer: extract the top domain (e.g. example.com) from a given string, which may or may not be a valid URL. I had need of such functionality recently and found answers around the web lacking. So if you ever “just wanted the domain name” out of a string, [...]

Read More coding theory, crappy coding, php, programming, regular expressions, software development

Get HTTP status code of cURL call in PHP

Posted by Frank - September 10, 2009 - For techies
3

With all the fancy cURL-based API’s out there these days (Facebook and Twitter immediately come to mind), using cURL to directly access and manipulate data is becoming quite common. However like all programming, there’s always the chance for an error to occur, and thus these calls must be immediately followed by error checks to ensure [...]

Read More browsers, php, software development, Twitter

Build a slick Twitter feed on your site

Posted by Frank - July 14, 2009 - For techies
0

A few months ago I published an article describing how to output a Twitter stream on a page using PHP, and later followed up with two more to polish the display. The article content and code examples have since been tweaked based on feedback and my own debugging. If you haven’t already had a look, [...]

Read More lifestream, php, programming, regular expressions, social networking, Twitter

Translating PHP error constants

Posted by Frank - May 12, 2009 - For techies
1

I wanted to log all the errors thrown out by Fwd:Vault processes to ensure that any bugs I don’t catch myself bubble to the top very quickly. To get started, I replaced PHP’s default error handling with a custom error handler function, which simply logs the error in a MySQL table before passing it along [...]

Read More fwdvault, php, software development

Circumvent PHP errors with define_once()

Posted by Frank - April 6, 2009 - For techies
0

Core PHP does not include a define_once() function to complement functions like require_once() and include_once(), which is pretty silly in my opinion. While I am generally not a fan of using *_once statements due to the performance penalty (and incurred laziness), define_once is the exception. There are ways to look for a loaded/missing file, but [...]

Read More coding theory, handy functions, php

Find the second (or third, or fourth) occurence in a string

Posted by Frank - March 30, 2009 - For techies
1

PHP includes some handy functions to find the first or last occurrence of a given string token in a string: strpos and strrpos. However these functions are limited to just the first occurrence; what if I want to know the location of the second token’s position, or the third? These problems usually result in some [...]

Read More handy functions, php, programming

Extract email addresses from tags

Posted by Frank - January 15, 2009 - For techies
1

Ran into another cool hurdle today for my Fwd:Vault development. When I grab the message content to archive it in the system, first thing I do is scrub it out to ensure that (a) it displays properly, and (b) there are no misbehaving characters. I grab both plain text and HTML email formats (if present), [...]

Read More email, fwdvault, php, programming, regular expressions, security, usability

Parse URL’s in text, create links

Posted by Frank - December 15, 2008 - For everyone, For techies
8

I’m absolutely in love with the status update stream I’ve put together for Fwd:Vault (follow link for example). However in the process, I’ve discovered a huge drawback to the Twitter messaging system: it does not store links. The Twitter site itself will identify URL’s in messages and convert them into clickable links for you automatically. [...]

Read More fwdvault, php, regular expressions, Twitter

Display Twitter updates on your website

Posted by Frank - November 22, 2008 - For entrepreneurs, For everyone, For techies
27

Update: I’ve added a new chunk of code that will download and store your Twitter posts in a database, allowing you to do whatever the heck you want with them. After you’ve finished reading this, be sure to check that out as well. I am not a fan of social networking or so-called lifestreaming. I [...]

Read More extension, fwdvault, php, Twitter

Get number of message parts in an email using PHP

Posted by Frank - November 14, 2008 - For techies
1

Alright, I admit up front that this is a pretty specific problem, but hopefully some Googlers will find it useful. I recently had need for a small side project to read e-mails. Every e-mail is split up into parts; each “part” represents every separate piece of the e-mail. The plain text format, rich text or [...]

Read More email, php, software development
  • 1
  • 2

Categories

  • For entrepreneurs
  • For everyone
  • For techies

Latest Tweets

  • The word traps planners plan themselves into | Life. Then strategy http://t.co/iANAdASb
    May 8, 2012 - 2:43 pm
  • Random network security tip for those about to appear on TV - Boing Boing http://t.co/tC1lXFQ4
    May 8, 2012 - 1:42 pm
  • A Picture http://t.co/H846Uy69
    April 27, 2012 - 12:25 pm
  • The Broken "Buy-One, Give-One" Model: 3 Ways to Save Toms Shoes | Co.Exist: World changing ideas and innovation http://t.co/RI0sVMW6
    April 10, 2012 - 12:23 pm

Recent Comments

  • whiz on What 255 characters looks like
  • Andrew on Find the second (or third, or fourth) occurence in a string
  • IanArcher on Get number of message parts in an email using PHP
  • Usama on Remove parent directories from tar archives
  • Frank on It’s dangerous to go alone

Recent Posts

  • It’s dangerous to go alone
  • Create Self-Signed Wildcard SSL Certificate
  • What comes after the yottabyte?
  • Write code like they do in Hollywood
  • Brian Rolle machine gun celebration
(c) 2012 Frank Koehl. All Rights Reserved.
  • Contact Us
  • Sitemap