Trackback Technical Specification

xiaoxiao2021-03-06  155

This article describes the framework of TRACKBACK, a point-to-point communication, and website. Trackback's central idea is the concept of trackback ping, from essentially, TRACKBACK PING is a request, advertisement "resource A is related to resource B, or chain Resources B. "A Trackback" Resource "is represented by a Trackback ping URL, which is a standard URI.

With the Trackback, the site can be announced to each other. For example, if the blogger hopes to inform the blog B, he wrote some interesting / related / horrhawful text, letting a trackback ping to B. This completes two things:

1, B can automatically list the website that references his article, visit the visitors of his website to read all articles related to this article, including the article.

2, ping provides a solid, direct link between his articles and your article, rather than that is dependent on external behavior (someone click on that connection) (such as reverse connection referre).

Send a trackback ping

TRACKBACK works using REST (REP: //www.ics.uci.edu/ ~fielding/pubs/dissertation/top.htm) mode, requests to transfer through standard HTTP calls. To send a Trackback Ping, the client sends a standard HTTP request to the server and then receives a simple XML format (see below).

In the TRACKBACK system, the URL to receive Trackback Pings is called Trackback Ping Url. A typical trackback ping url is like http://www.infomall.cn/cgi-bin/mallgate/20040514/Http://www.foo.com/ MT-TB.CGI / 5, where 5 is the Trackback ID. The server side can define the TRACKBACK PING URL in any meaningful format; the client should not be limited to a specific format.

In order to send a ping, the client sends a POST format HTTP request to the TRACKBACK PING URL. The content Type of the requested content should be Application / X-www-form-urlencoded. For example, go to http://www.infomall.cn/ CGI-BIN / MALLGATE / 20040514 / http://www.foo.com/mt-tb.cgi/5 PING request may look like:

Post http://www.foo.com/mt-tb.cgi/5

Content-Type: Application / X-WWW-FORM-URLENCODED

Title = foo bar & url = http://www.bar.com/&excerpt=my ketcerpt&blog_name=foo

Note: In the old version of the TRACKBACK specification, ping is sent to HTTP requests in GET format. This way will no longer be supported; the Movable Type system released in January 2003 will remove support for GET.

Possible parameters include:

Title: Title of the article

Excerpt: Abstract of the article. In the Movable Type system, if the extract information exceeds 255 characters, it will be truncated to 252 characters, and add ... three characters later.

URL: The permanent connection of the article. Like other permanent connections, this connection should be accurately positioned in the entrance to the article, which is used when there is any questions.

Blog_name: The name of the Blog published in the article.

In the Movable Type system, only URLs are required in the above parameters. If the title is not provided, the value of the URL will be used as a title. For the response information of the above request, arranged in XML format, so that the error can be implemented inspection. (Error of the HTTP layer will return like this - for example, if the resource referred to in the TRACKBACK URL is not existed on the server, the status code 404 will return).

A successful ping will return as follows:

0

A failed ping will return as follows:

1

The Error Message

Of course, the application should allow the field to increase fields as needed, but the XML structure of the response remains unchanged.

Retrieve Trackback Pings

To retrieve a particular TRACKBACK PING URL received, send it a GET format HTTP request, request string (query string) is? __ mode = rss. In the future revision, - once converted from POST End of the transition period of GET - This will be very simple, send a GET request to the Trackback Ping URL, will return a column of ping.

A GET request sample is now as follows ::

Get http://192.168.1.103/mt/mt-tb.cgi/3?__mode=RSS

The response to this request is either returned to the error message as described above, or return a column of TRACKBACK PINGS with the RSS specification format flag, and the entire answer content is not rootless element is .

E.g:

0

TRACKBACK TEST </ TITLE></p> <p><link> http://this/the/trackback/item/link/ </ link></p> <p><Description> Description of the TRACKBACK ITEM </ DESCRIPTION></p> <p><Language> EN-US </ Language></p> <p><item></p> <p><title> TRACKBACK DEMO </ TITLE></p> <p><link> http://this/the/permalink/ </ link></p> <p><Description> Excerpt </ description></p> <p></ item></p> <p></ CHANNEL></p> <p></ rss> </ response></p> <p>In the part between the label <RSS> and </ RSS> is true RSS data; the remaining parts are packaged packaging, which can be ignored when processing.</p> <p>The TRACKBACK PING URLS automatically discovers that the Trackback client requires a way to do a specific URL or Blog's Track Ping URL. The server should embed RDF in the generated page; RDF describes metadata on the article, allowing clients Automatically discovers the Trackback Ping URL.</p> <p>RDF samples are as follows:</p> <p><RDF: RDF XMLns: RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"</p> <p>XMLns: DC = "http://purl.org/dc/elements/1.1/"</p> <p>XMLns: TRACKBACK = "http://madskills.com/public/xml/rss/module/trackback/"></p> <p><RDF: Description</p> <p>RDF: About = "http://www.foo.com/archive.html#foo"</p> <p>DC: Identifer = "http://www.foo.com/archive.html#foo"</p> <p>DC: Title = "foo bar"</p> <p>TRACKBACK: PING = "http://www.foo.com/tb.cgi/5" /></p> <p></ rdf: rdf></p> <p>Note: The RDF information embedded in the XHTML page will be regarded as a non-standard specification by the current inspector.</p> <p><! -</p> <p><RDF: RDF XMLns: RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"</p> <p>...</p> <p></ rdf: rdf></p> <p>-></p> <p>This is not a perfect solution, but as a temporary response measure it works.</p> <p>The DC: element is a standard Dublin core element; Trackback: ping element comes from the trackback module of RSS 1.0 / 2.0, see http://www.infomall.cn/cgi-bin/mallgate/20040514/Http://madskills. COM / PUBLIC / XML / RSS / MODULE / TRACKBACK /</p> <p>Given a URL MY_URL, the customer will follow the steps to find the trackback ping URL:</p> <p>Send the HTTP request in the GET format, retrieve the contents of the page corresponding to my_URL.</p> <p>Scan the page content, find the embedded RDF. You may be embedded in the page to find the DC: Identifier equal to the RDF information of MY_URL.</p> <p>TRACKBACK: ping value from the RDF block, this is the TRACKBACK PING URL.</p> <p>Once the client does use the Trackback ping URL, it can send TRACKBACK PING.</p> <p>-----------</p> <p>TRACKBACK seems difficult to understand, but there will be no problem after understanding.</p> <p>Basically, its idea is as follows:</p> <p>1. There is a topic on a blog a, you want to send a related topic on your own Blog B, and want to publish the content and reply to Blog A.</p> <p>2. At this point you can copy the TRACKBACK link on A, enter the TRACKBACK URL box in your blog b.</p> <p>3. The summary of your theme and the following reply will be automatically sent to the topic of Blog A.</p> <p>To put it bluntly, it is a cross-site message system. (I hope is a more correct description)</p> <p>TRACKBACK's implementation has two key points:</p> <p>1. As the blog server (that is, Blog a), you need to receive each blog that uses the TrackBack connection to send to yourself and send back feedback.</p> <p>It is necessary to parse the data, but this is easy to implement .2. As the client (Blog B), you need to send a content summary to the server through the specified link when there is a new reply.</p> <p>At present, the official document defines two ways:</p> <p>1) Through querystring (gradually abolished)</p> <p>2) Form POST simulated by HTTP Header by post form</p> <p>PHP can be implemented by FOPEN. ASP can be implemented by ServerXMLHTTP (old XMLHTTP performance and function is not ideal). Perl please refer to MovableType.</p> <p>Others are TRACKBACK LIST RSS and Autodiscovery. I am implemented by the former, the latter is not intended, although it is simple.</p> <p>TRACKBACK LIST is not much used, just list all TRACKBACK issued to this URL with XML.</p> <p>Autodiscovery is actually hidden in the page, which automatically finds the Trackback URL to the Trackback client (some people say Autodiscovery will ruin the practicality of Trackback, because this will give spam robot Machine).</p> <p>However, there is currently different issues in TRACKBACK because there is no specification. For example, my blog is GB2312 and others are UTF-8, then it is garbled. To turn Blog to UTF-8, Windows 2000 Server and Higher version of the server is hesitant.</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-111667.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="111667" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.045</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = '5RuB7JjZb1gmk2Kxq9tFLsY_2BYaLiBTuP55M691Clph7eeMVV52XpGJJQkDQ9_2BddwCdgjG8BAEzrlzx73'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>