Trackbacks with ColdFusion
March 29, 2005
It's pretty simple to implement trackback pings with CFML, since trackbacks are simply just a HTTP form post to a specific url. The result is an XML file.
So do post a trackback to another blog, simply use CFHTTP:
<cfhttp url="http://the.trackback.url/" method="post"> <cfhttpparam name="url" value="http://www.yourblog.com/entry/123" type="formfield"> <cfhttpparam name="title" value="This is the title of your entry" type="formfield"> <cfhttpparam name="blog_name" value="Your Blog Name" type="formfield"> <cfhttpparam name="excerpt" value="An excerpt of your entry" type="formfield"> </cfhttp> <cfoutput>#HTMLEditFormat(cfhttp.filecontent)#</cfoutput>
The only required parameter is the url of your blog entry, all others are optional.
The resulting XML will look like the following if there are no errors:
<?xml version="1.0" encoding="utf-8"?> <response> <error>0</error> </response>
If there is an error, then the result will be something like this:
<?xml version="1.0" encoding="utf-8"?> <response> <error>1</error> <message>The error message</message> </response>
To receive a trackback ping, it's also pretty simple, because you just handle the form variables, and output the resulting XML.
You can find all this info in the trackback spec.
Tweet
Related Entries
- Trackbacks working on my blog - March 29, 2005
Trackbacks
Trackback Address: 293/00D0FABC848D636258DF5611296862EA
- Trackbacks working on my blog Pete Freitag
- Trackback Pings Adam Howitt's Blog
- How to issue a Trackback using Adobe ColdFusion and CFHTTP n-smith
Comments
On 02/18/2007 at 3:31:34 AM EST fgs wrote:
1
<cfhttp url="http://the.trackback.url/" method="post"> <cfhttpparam name="url" value="http://www.yourblog.com/entry/123" type="formfield"> <cfhttpparam name="title" value="This is the title of your entry" type="formfield"> <cfhttpparam name="blog_name" value="Your Blog Name" type="formfield"> <cfhttpparam name="excerpt" value="An excerpt of your entry" type="formfield"> </cfhttp>
<cfoutput>#HTMLEditFormat(cfhttp.filecontent)#</cfoutput>
On 11/10/2007 at 4:58:53 AM EST Bobb wrote:
2
It's pretty simple to implement trackback pings with CFML, since trackbacks are simply just a HTTP form post to a specific url. The result is an XML file. http://www.mfipb.com/?mforum=bankruptcyhelp Look and join
Post a Comment
Recent Entries
- Writing Secure CFML cfObjective 2013 Slides
- Upgrading to Java 7 on Linux
- J2EE Sessions in CF10 Uses Secure Cookies
- Learn about ColdFusion Security at cfObjective 2013
- Session Loss and Session Fixation in ColdFusion
- FuseGuard 2.3 Released
- CKEditor Spell Checker Plugin
- Adobe Says Go Ahead and Upgrade your ColdFusion JVM


add to del.icio.us



