MediaPost

Bit.ly API with ColdFusion / CFHTTP

Until Feb 23, 2011 I had been authenticating against the bit.ly API using the username/password properties on cfhttp.

<cfhttp url="http://api.bit.ly/shorten?version=2.0.1&longUrl=www.longurl.com&apiKey=xxxxxxxx"
username="myusername"
password="mypassword">
</cfhttp>

On Feb 23, this approach started failing this error message:
{"errorCode": 500, "errorMessage": "MISSING_ARG_LOGIN", "results": null, "statusCode": ""}

To fix, simply add the parameter login directly to the url for the API call, like this:

<cfhttp url="http://api.bit.ly/shorten?version=2.0.1&longUrl=www.longurl.com&apiKey=xxxxxxxx&login=myusername">
</cfhttp>

The password parameter isn ...


Getting the link from A tags /Getting all the links from a string in ColdFusion

I thought for sure that this would be something fairly easy to find. Alas, it was not.

I did find a way to get all of the text from between the a tag, but not the links.  Here's how you do it:

<cfset beginlink = REFindNoCase("https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?", myText)>
<cfset endlink = findnocase('"', myText, beginlink)>
<cfset linklen = endlink - beginlink>
<cfset mylink = mid(myText, beginlink, linklen)>

Obviously, you can optimize this into a couple of lines, but there it is.


Virtual Hosts with Jboss / Apache / ColdFusion

So I needed to do something that I used to consider simple. I had www.mysite.com up and running with Apache / Jboss / ColdFusion and I wanted to create a virtual host, sitetwo.mysite.com to point the same configuration as www.mysite.com. I used to do this easily in IIS by creating a new Host Header entry under the website properties in IIS. Not so simple with the new configuration.

Step 1: Setup the DNS record. All starts with the CNAME record pointing sitetwo.mysite.com to www.mysite.com.

Step 2: Let Apache know about sitetwo.mysite ...


Spidering and Saving Images with CFHTTP and CFFILE

Goal: To spider a site (our own site) and save all image files from the pages on that site to a hard disk on another server.

Thanks to Ben Nadel for showing me the way on this one.  For some reason the path/file attributes on cfhttp were not allowing me to save a image file to the hard disk on our linux (CentOS) server. I thought I could save the file using cfcontent somehow, which led me to Ben's post. Never thought to just save the binary stream using cffile. Not sure if there was a permissions problem ...


PayPal Merchant Sevices Phone Number

If you're looking to call PayPal re: a Merchant Services or Payflow Pro account, here's the direct number, so you don't have to call India. 866-445-3167.


Earthlink Blacklist Email

Send this to: blockedbyearthlink@abuse.earthlink.net and blocked@corp.earthlink.net

Hello, I am the email administrator for MediaPost Communications, Soccer America LLC., American Illustration American Photography and Images.com.

I have recently been made aware that Earthlink is blocking email communications from one of our email servers, [mail.mydomain.com] [192.168.1.1]. Earthlink email servers are responding with the following error.

04/02/2007 01:01:49 AM [006] WARNING: 550 550 Dynamic/zombied/spam IPs blocked. Write blockedbyearthlink@abuse.earthlink.net

We have proper reverse DNS entries, SPF records and we’re strictly an opt-in ...


KTML problems “Illegal Request”

KTML is a great online HTML editor, except for the following problem I discovered.

When I installed KTML I put it in a global folder, as described below. Then I aliased that folder as "includes/" in IIS in every application I needed to have access to a KTML editor. Everything worked great until I went to upload an image, or do anything requiring the "Remote Folder Browser". I would get this annoying error, "Illegal Request".
Ok so I solved the problem, but not the way I wanted to. In order to get it to work correctly I had to put ...


Comcast Blacklist

As a new Comcast subscriber I jumped through hoops to see if we could get white-listed and finally ended up being forwarded to this form. It, apparently is the only way for a subscriber or mail administrator to get off the black list. But let's call one more time, to see if we can't get this expedited. Error message is:

01/24/2007 02:07:33 AM [198] WARNING: 550 [Insert IP] blocked by ldap:ou=rblmx,dc=comcast,dc=net -> BL004 Blocked for spam. Please see http://www.comcast.net/help/faq/index.jsp?faq=SecurityMail_Policy18628

So ...


MySQL “Explain”

This command would have saved me a couple of hours today should I have known about it. While running a query that returned 48k rows, I needed to run a subquery to check against another table to exclude certain other rows. (Querying a list of people to send a promotional email to while trying to make sure the email didn't go to any people who were already registered for a show [show registrants stored in that separate table]).

I attempted to do this using several different techniques:


  • and m_email not in (select email from attendees where shw_id = 19)

  • and ...


Sorbs Sucks

My own personal experience with Sorbs is that they suck. They incorrectly listed us as part of a dynamic IP range likely to generate spam. WRONG! Apparently they're using a database of IPs that hasn't been maintained since 2003. Why bother? My advice to anyone looking to curb spam is to use a RBL, but whatever you do don't use Sorbs.

Taken from: http://cpbotha.net/weblogs/cpbotha/archives/002023.html


Update: I did finally get a response from one of ...


Page 1 of 2 1 2 »