Home > pingback

pingback

Pingback is a project mainly written in PHP, it's free.

SemPb - semantic pingback library written in PHP.

// Copyright 2011 fcns.eu // Author: Andrei Sambra - [email protected]

What is SemPb?

SemPB stands for Semantic Pingback, a service aiming to let users know that someone has added them as friends in their foaf profiles. In order to receive pingbacks, users should add a 'pingback' relation to their profile:

<pingback:to xmlns:pingback='http://purl.org/net/pingback/' rdf:resource='http://your-favorite-pingback-service.com/' />

As you can see, SemPb is based on the pingback ontology described at http://purl.org/net/pingback/. It is intended to be a service which runs on the same server as the one hosting your WebID profile. SemPb is based on the protocol described at http://www.w3.org/wiki/Pingback.

Right now SemPb transmits pings by email, therefore users should also have a valid foaf:mbox relation if they would like to receive pings. The form used to transmit pingbacks is displayed using RDFa. The main reason is that using a semantic description of the form would allow other services to use this form through RESTful requests (so far only POST). In order for others to identify that this is a pingback endpoint, parsing the form should at least return a triple containing "<> a pingback:Container ."

How it works.

Initial configuration

In order to be able to use SemPB, users must first configure the following variables, found in pingback.php:

  • $sender = '[email protected]'; // email address to use as source recipient
  • $recipient = '[email protected]'; // your email address
  • $me = 'http://host.com/people/username/card#me'; // your webid

Now you can receive pingbacks!

Pingback process

After suppying the form with a source WebID, the following steps are taken:

  • fetches the source WebID profile to obtain its owner's name
  • checks that the list of foaf:knows relations in the source WebID profile contains a reference to the destination WebID
  • if a match is found, it sends an email to the address you specified in the initial configuration

Email contents

A typical email will contain the following lines (which can be modified):


From: WebID: Message (optional):

Dependencies

Apache and PHP

  • SemPb currently uses graphite (http://graphite.ecs.soton.ac.uk/) and ARC2 (https://github.com/semsol/arc2/) PHP libraries for RDF parsing.

TODO

  • [done] add full semantic support, in conformance to http://www.w3.org/wiki/Pingback
  • [medium] provide WebID authentication
  • [low] add support for additional types of pings (other than email)

Additional notes

For more information on pingback, please visit: http://www.w3.org/wiki/Pingback

Previous:sample_app