Download the PHP package pear2/services_linkback without Composer

On this page you can find all versions of the php package pear2/services_linkback. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package services_linkback


PEAR2 Services_Linkback

Pingback and webmention client and server implementation for PHP 5.3+.


Linkback server

The package provides a basic pingback+webmention server implementation that can be customized easily via callbacks.

Usage:

$srv = new \PEAR2\Services\Linkback\Server();
$srv->addCallback(new PingbackLogger());
$srv->run();

Glossary

source URL Remote URL that links to the local target URL target URL Local URL that gets linked by the source URL

Customization via callbacks

The server provides 4 types of callbacks to modify its behaviour. Each callback needs to implement one of the four interfaces:

Services\\Linkback\\Server\\Callback\\ITarget

Verifies that the target URL exists in the local system. Useful to filter out pingbacks for non-existant URLs.

FIXME: Default implementation

Services\\Linkback\\Server\\Callback\\ISource

Fetches the source URL for further verification. Used to determine if the source URL really exists.

Services_Pingback provides the Services\Linkback\Server\Callback\FetchSource callback class that is automatically registered with the server.

Services\\Linkback\\Server\\Callback\\ILink

Verifies that the source URL content really links to the target URL. Used to filter out fake pingbacks that do not actually provide links.

Services_Pingback provides the Services\Linkback\Server\Callback\LinkExists callback class that is automatically registered with the server.

Services\\Linkback\\Server\\Callback\\IStorage

After all verifications have been done, the storage finally handles the pingback - it could e.g. log it to a file or a database.

Services_Pingback does not provide a default storage implementation; you have to write it yourself.

TODO

See what we can learn from http://www.acunetix.com/blog/web-security-zone/wordpress-pingback-vulnerability/


Linkback client

Tell someone that you linked to him:

$from = 'http://my-blog.example.org/somepost.html';
$to   = 'http://b.example.org/inspiration.html';
$lbc  = new \PEAR2\Services\Linkback\Client();
$lbc->send($from, $to);

You can adjust the HTTP_Request2 settings:

$req = $lbc->getRequest();
$req->setConfig(
    array(
        'ssl_verify_peer' => false,
        'ssl_verify_host' => false
    )
);
$lbc->setRequestTemplate($req);

And change the user agent header sent with the linkback requests:

$req = $lbc->getRequest();
$headers = $req->getHeaders();
$req->setHeader('user-agent', 'my blog engine');
$lbc->setRequestTemplate($req);

And a debug mode is available, too:

$lbc->setDebug(true);

This setting stores HTTP responses for later inspection.


Installation

Using composer:

$ composer require pear2/services_linkback


About Services_Linkback

Services_Linkback was written by Christian Weiske and is licensed under the LGPLv3 or later.

Homepage http://pear2.php.net/PEAR2_Services_Linkback Bug tracker https://github.com/pear2/Services_Linkback/issues Documentation The examples/ folder. Packagist https://packagist.org/packages/pear2/services_linkback

Unit test status https://travis-ci.org/pear2/Services_Linkback


All versions of services_linkback with dependencies

PHP Build Version
Package Version
Requires ext-xmlrpc Version *
pear/http2 Version ^2.0
pear/http_request2 Version ^2.5
pear/net_url2 Version ^2.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pear2/services_linkback contains the following files

Loading the files please wait ....