trackback::send_ping (public)
trackback::send_ping [ -ping_url ping_url ] [ -url url ] \ [ -excerpt excerpt ] [ -title title ] [ -blog_name blog_name ] \ [ -method method ]
Defined in packages/trackback/tcl/trackback-procs.tcl
sends a trackback ping. returns status code if successful, or error message if unsuccessful
- Switches:
- -ping_url (optional)
- URL to send ping to
- -url (optional)
- URL ping is from
- -excerpt (optional)
- Short text from URL referring to ping_url
- -title (optional)
- title of URL
- -blog_name (optional)
- -method (optional, defaults to
"POST"
)- Author:
- Dave Bauer dave@thedesignexperience.org
- Created:
- 2003-04-14
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: ns_log debug "trackback: ping_url=$ping_url method=$method" # POST or GET to trackback ping url set query_set [ns_set create] ns_set put $query_set url $url if {[string equal $method GET]} { set form_vars [export_vars {url excerpt title blog_name}] ns_log debug "trackback: full url = ${ping_url}&${form_vars}" # old style GET set result [ns_httpget ${ping_url}&${form_vars} 60] ns_log debug "trackback: trackback returned: $result" } else { #must be POST set form_vars [export_vars { url }] if {![empty_string_p $excerpt]} { ns_set put $query_set excerpt $excerpt } if {![empty_string_p $title]} { ns_set put $query_set title $title } if {![empty_string_p $blog_name]} { ns_set put $query_set blog_name $blog_name } if {[catch {[ns_httppost $ping_url "" $query_set]} result]} { ns_log debug "trackback: trackback returned: $result" } } return $resultXQL Not present: PostgreSQL, Oracle Generic XQL file: packages/trackback/tcl/trackback-procs.xql