Source for file send.php
Documentation is available at send.php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker */
* Services_Pingback send example.
if (isset ($_REQUEST['source'])) {
// Load Services_Pingback
require_once 'Services/Pingback.php';
$selfURI = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
$sourceURI = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/source.php';
$targetURI = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/target.php';
// let's assume that we don't know this pingback URI, to test
// Services_Pingback::autoDiscover() method.
$pingbackURI = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/receive.php';
'sourceURI' => $sourceURI,
'targetURI' => $targetURI
print '<h2>Services_Pingback Example</h2>' . "\n" .
'<a href="' . $selfURI . '?source" target="_blank">send.php</a> | ' .
'<a href="' . $pingbackURI . '?source" target="_blank">receive.php</a> | ' .
'<a href="' . $sourceURI . '?source" target="_blank">source.php</a> | ' .
'<a href="' . $targetURI . '?source" target="_blank">target.php</a>' .
'<strong>source URI</strong>: <a href="' . $sourceURI . '" target="_blank">' . $sourceURI . "</a><br />\n" .
'<strong>target URI</strong>: <a href="' . $targetURI . '" target="_blank">' . $targetURI . "</a><br />\n";
print '<strong>------------------------- Sending Pingback --------------------------</strong>' . "<br />\n";
$res = $pingback->send ();
print '<strong>------------------------- Received Response -------------------------</strong>' . "<br />\n";
if (PEAR ::isError ($res)) {
$response = $res->getMessage ();
print '<strong>Response</strong>: ' . $response;
* c-hanging-comment-ender-p: nil
Documentation generated on Mon, 11 Mar 2019 14:49:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|