<commit_before>===================================
Pingbacks for PHP
===================================

Created by <NAME>. This README is based on a partially
modified blog post that appread on http://tedeh.net.

-----------------------------------
Introduction
-----------------------------------

Pingbacks, quoting Wikipedia, are "one of three types of linkbacks, 
methods for Web authors to request notification when somebody links to one of their documents". 
More precisely, an explicitly defined set of procedures based on XML-RPCxmlrpcwiki
that enable web applications (typically blogs) to communicate.

-----------------------------------
My end
-----------------------------------

Pingbacks have seen many popular implementations lately. 
XML-RPC is extensively defined and available in a wide array of environments. 
In early 2009, I was working on a blog that required a full, on the spec 
implementation of Pingbacks. Naturally, my first instinct wasn't to build one 
custom only for myself, but to seek out a library that fitted my needs. 
I found a few built with PHP (scripting language of choice) but was thourougly 
disappointed with each and every one of them. They were all bloated with crude 
code and ad hoc solutions. Neither leveraged the full capabilities of PHP whatsoever.

Instead of compromising, I actually did decide to build one for myself. 
This post, and the associated library, is what came out of these attempts.

-----------------------------------
Solution
-----------------------------------

Pingback functionality are a two-sided coin: the client and the server. 
The client is simply responsible for sending a pingback to an URL that fronts 
an XML-RPC server. The server then processes this request and checks it 
against a certain set of procedures so that it complies with what's defined 
in the official specification, and the server itself.

Implementing the client was very simple, and resulted in about 9 lines of PHP code 
(basically a cURL-request) wrapped inside a static method. The server required more
consideration. No generalized library like the one I wrote can for example know wheter 
or not a pingback has already been registered or not. But it can easily find out if a 
page is backlinking and if the source and target are valid URLs and so forth.

The solution resulted one regular and one static class: PingbackServer and PingbackUtility. 
PingbackUtility contains a few static methods to aid the user and the server 
(See the usage section). PingbackUtility includes the client. `PingbackServer` 
is an instantiable class with a set of methods and constants for 
implementing a specification compliant pingback server.

-----------------------------------<commit_msg>Another typo<commit_after>===================================
Pingbacks for PHP
===================================

Created by <NAME>. This README is based on a partially
modified blog post that appread on http://tedeh.net.

-----------------------------------
Introduction
-----------------------------------

Pingbacks, quoting Wikipedia, are "one of three types of linkbacks, 
methods for Web authors to request notification when somebody links to one of their documents". 
More precisely, an explicitly defined set of procedures based on XML-RPCxmlrpcwiki
that enable web applications (typically blogs) to communicate.

-----------------------------------
My end
-----------------------------------

Pingbacks have seen many popular implementations lately. 
XML-RPC is extensively defined and available in a wide array of environments. 
In early 2009, I was working on a blog that required a full, on the spec 
implementation of Pingbacks. Naturally, my first instinct wasn't to build one 
custom only for myself, but to seek out a library that fitted my needs. 
I found a few built with PHP (scripting language of choice) but was thourougly 
disappointed with each and every one of them. They were all bloated with crude 
code and ad hoc solutions. Neither leveraged the full capabilities of PHP whatsoever.

Instead of compromising, I actually did decide to build one for myself. 
This post, and the associated library, is what came out of these attempts.

-----------------------------------
Solution
-----------------------------------

Pingback functionality are a two-sided coin: the client and the server. 
The client is simply responsible for sending a pingback to an URL that fronts 
an XML-RPC server. The server then processes this request and checks it 
against a certain set of procedures so that it complies with what's defined 
in the official specification, and the server itself.

Implementing the client was very simple, and resulted in about 9 lines of PHP code 
(basically a cURL-request) wrapped inside a static method. The server required more
consideration. No generalized library like the one I wrote can for example know wheter 
or not a pingback has already been registered or not. But it can easily find out if a 
page is backlinking and if the source and target are valid URLs and so forth.

The solution resulted one regular and one static class: PingbackServer and PingbackUtility. 
PingbackUtility contains a few static methods to aid the user and the server 
(See the usage section). PingbackUtility includes the client. PingbackServer
is an instantiable class with a set of methods and constants for 
implementing a specification compliant pingback server.

-----------------------------------
{'fraction_non_alphanumeric': 0.1394072447859495, 'fraction_numerical': 0.0018294914013904135, 'mean_word_length': 2.930265995686556, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3538690', 'n_tokens_mistral': 1253, 'n_tokens_neox': 1187, 'n_words': 759}