pingTrackBackURL(trackbackurl, permalink [, charset] [, title] [, excerpt] [, blogName] [, timeout])
Last updated September 14, 2005
Version: 1 | Requires: ColdFusion MX | Library: NetLib
Description:
Pings a TrackBack URL according to the TrackBack Specification from SixApart (http://www.sixapart.com/pronet/docs/trackback_spec).
Return Values:
Returns a string.
Example:
<cfset permLink = "http://www.cflib.org">
<cfset charset = "utf-8">
<cfset title = "Just a test">
<cfset excerpt = "Let we see how this UDF works">
<cfset blogName = "The CFLib Project">
<cfset ret = pingTrackBack(trackBackUrl, permLink, charset, title, excerpt, blogName)>
<cfoutput>#ret#</cfoutput>
Parameters:
| Name | Description | Required |
|---|---|---|
| trackbackurl | The TrackBack ping URL to ping | Yes |
| permalink | The permalink for the entry | Yes |
| charset | Default to utf-8. | No |
| title | The title of the entry | No |
| excerpt | An excerpt of the entry | No |
| blogName | The name of the weblog to which the entry was posted | No |
| timeout | Default to 30. Value, in seconds, that is the maximum time the request can take | No |
Full UDF Source:
<!---
Pings a TrackBack URL.
@param trackbackurl The TrackBack ping URL to ping (Required)
@param permalink The permalink for the entry (Required)
@param charset Default to utf-8. (Optional)
@param title The title of the entry (Optional)
@param excerpt An excerpt of the entry (Optional)
@param blogName The name of the weblog to which the entry was posted (Optional)
@param timeout Default to 30. Value, in seconds, that is the maximum time the request can take (Optional)
@return Returns a string.
@author Giampaolo Bellavite (giampaolo@bellavite.com)
@version 1, January 12, 2006
--->
<cffunction name="pingTrackback" output="false" returntype="string">
<cfargument name="trackBackURL" type="string" required="yes">
<cfargument name="permalink" type="string" required="yes">
<cfargument name="charset" type="string" required="no" default="utf-8">
<cfargument name="title" type="string" required="no">
<cfargument name="excerpt" type="string" required="no">
<cfargument name="blogName" type="string" required="no">
<cfargument name="timeout" type="numeric" required="no" default="30">
<cfset var cfhttp = "">
<cfhttp url="#arguments.trackBackURL#" method="post" timeout="#arguments.timeout#" charset="#arguments.charset#">
<cfhttpparam type="header" name="Content-Type" value="application/x-www-form-urlencoded; charset=#arguments.charset#">
<cfhttpparam type="formfield" encoded="yes" name="url" value="#arguments.permalink#">
<cfif structKeyExists(arguments, "title")>
<cfhttpparam type="formfield" encoded="yes" name="title" value="#arguments.title#">
</cfif>
<cfif structKeyExists(arguments, "excerpt")>
<cfhttpparam type="formfield" encoded="yes" name="excerpt" value="#arguments.excerpt#">
</cfif>
<cfif structKeyExists(arguments, "blogName")>
<cfhttpparam type="formfield" encoded="yes" name="blog_name" value="#arguments.blogName#">
</cfif>
</cfhttp>
<cfreturn cfhttp.FileContent>
</cffunction>
Search CFLib.org
Latest Additions
Tayo Akinmade added
arrayTrim
11 day(s) ago
Will Belden added
longTime
17 day(s) ago
James Sleeman added
quickSort
27 day(s) ago
Ben Forta added
GetHostAddress
30 day(s) ago
Top Rated
EksporSQLData
Rated 5.0, 16 time(s)
backupDatabase
Rated 5.0, 13 time(s)
indentXml
Rated 5.0, 10 time(s)
generateSsccAsn
Rated 5.0, 4 time(s)