]> git.vanrenterghem.biz Git - www2.vanrenterghem.biz.git/blob - source/posts/sending_pingback_oldskool_indieweb.org
59d96c9de8e4c9519a1149721405e1ee015755b0
[www2.vanrenterghem.biz.git] / source / posts / sending_pingback_oldskool_indieweb.org
1 #+title: About sending pingbacks, webmentions and some thoughts on how to improve on them.
2 #+filetags: indieweb blogging open_web
3 #+date: 2023-10-31T20:41:30+08:00
5 In a 'blast from the past', I sent my first
6 [[https://www.hixie.ch/specs/pingback/pingback][pingback]] after writing
7 the [[previous post|agent based models digital twins]]. A pingback is a
8 way for a blogger to send a message to another blogger, informing them
9 they've written a post that refers to theirs, e.g. as a reply or an
10 extension of the ideas raised.
12 The process is a bit more involved than using a
13 [[https://www.w3.org/TR/webmention/][webmention]], which I've used
14 before and [[implemented support for|Implementing webmention on my
15 blog]] a while back, due to requiring an XML message to be created
16 rather than a simple exchange of URLs.
18 First, I created a file =pingback.xml= containing the URLs of the blog
19 post I wrote and the one I made reference to within my post. The
20 standard defines the schema, resulting in the following:
22 #+BEGIN_SRC XML
23 <?xml version="1.0" encoding="UTF-8"?>
24 <methodCall>
25     <methodName>pingback.ping</methodName>
26     <params>
27         <param>
28             <value><string>https://www.vanrenterghem.biz/blog/posts/agent_based_models_digital_twins/</string></value>
29         </param>
30         <param>
31             <value><string>https://johncarlosbaez.wordpress.com/2023/10/25/software-for-compositional-modeling-in-epidemiology/</string></value>
32         </param>
33     </params>
34 </methodCall>
35 #+END_SRC
37 Next, I used =curl= on the command-line to send this file in a POST
38 request to Wordpress's pingback service. I had to use the =-k= option to
39 make this work - bypassing verification of the TLS certificate.
41 #+BEGIN_SRC sh
42 curl -k https://johncarlosbaez.wordpress.com/xmlrpc.php -d @pingback.xml
43 #+END_SRC
45 In a sign things were going well, I saw the following appear in my
46 website's access log:
48 #+BEGIN_SRC txt
49 192.0.112.141 - - [29/Oct/2023:09:35:06 +0100] "GET /blog/posts/agent_based_models_digital_twins/ HTTP/1.1" 200 2676
50 "https://www.vanrenterghem.biz/blog/posts/agent_based_models_digital_twins/"
51 "WordPress.com; https://johncarlosbaez.wordpress.com; verifying pingback
52 from 139.216.235.49"
53 #+END_SRC
55 Finally, I received the following response to my =curl= request on the
56 command-line:
58 #+BEGIN_SRC XML
59 <?xml version="1.0" encoding="UTF-8"?>
60 <methodResponse>
61   <params>
62     <param>
63       <value>
64       <string>Pingback from https://www.vanrenterghem.biz/blog/posts/agent_based_models_digital_twins/ to https://johncarlosbaez.wordpress.com/2023/10/25/software-for-compositional-modeling-in-epidemiology/ registered. Keep the web talking! :-)</string>
65       </value>
66     </param>
67   </params>
68 </methodResponse>
69 #+END_SRC
71 That "Keep the web talking! :-)" message made me smile.
73 In order to understand a bit better how things were being processed, I
74 checked the Wordpress code for its pingback service, and it appears they
75 [[https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-xmlrpc-server.php?rev=56637#L7040][take
76 the title of the linked article as the author]], which seems a bit odd.
77 The pingback standard didn't allow for anything but the swapping out of
78 links though. How your reference is summarized on the referred site is
79 entirely left to recipient - who may process pingbacks manually or use a
80 service automating (parts of) the processing.
82 Wordpress processes pingbacks automatically, turning them into comments
83 on the original post. As the comment text,
84 [[https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-xmlrpc-server.php?rev=56637#L7036][Wordpress
85 uses the link text in the anchor element]] with a horizontal ellipsis
86 around it, and some filtering to prevent the comment from being too
87 long. It's odd how the standard didn't define further approaches to make
88 this a bit easier. A pingback attribute in the anchor element would have
89 been helpful for instance, as we could put some text in there to
90 summarise our page when the pingback is processed automatically. Most
91 surprisingly maybe, with the benefit of hindsight, it would have been
92 interesting had the subsequent standard that emerged, Webmention,
93 implemented some further enhancements.
94 [[https://aaronparecki.com/][Aaron Parecki]], author of the Webmention
95 W3C Recommendation, might know if that was ever considered, or just not
96 within the use case for pingbacks / webmentions? There seemed to have
97 been [[https://aaronparecki.com/2019/10/15/26/][some thought put into it
98 in 2019]] at least.