use Friendica\Protocol\DFRN;
use Friendica\Protocol\OStatus;
use Friendica\Protocol\Feed;
+use Friendica\Util\Network;
use Friendica\Util\ParseUrl;
require_once 'include/bbcode.php';
dba::update('contact', ['hub-verify' => $verify_token], ['id' => $contact['id']]);
}
- post_url($url, $params);
+ Network::postURL($url, $params);
logger('subscribe_to_hub: returns: ' . $a->get_curl_code(), LOGGER_DEBUG);
use Friendica\Util\Network;
use Friendica\Util\XML;
-function post_url($url, $params, $headers = null, &$redirects = 0, $timeout = 0)
-{
- return Network::postURL($url, $params, $headers, $redirects, $timeout);
-}
-
function xml_status($st, $message = '')
{
Network::xmlStatus($st, $message);
use Friendica\Network\Probe;
use Friendica\Protocol\Diaspora;
use Friendica\Util\Crypto;
+use Friendica\Util\Network;
require_once 'include/enotify.php';
require_once 'include/items.php';
*
*/
- $res = post_url($dfrn_confirm, $params, null, $redirects, 120);
+ $res = Network::postURL($dfrn_confirm, $params, null, $redirects, 120);
logger(' Confirm: received data: ' . $res, LOGGER_DATA);
. '&sec=' . $sec
);
} else {
- $s = post_url($r[0]['poll'], [
+ $s = Network::postURL($r[0]['poll'], [
'dfrn_id' => $encrypted_id,
'type' => 'profile-check',
'dfrn_version' => DFRN_PROTOCOL_VERSION,
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
+use Friendica\Util\Network;
require_once 'include/text.php';
require_once 'mod/proxy.php';
}
if (strlen(Config::get('system', 'directory'))) {
- $x = post_url(get_server().'/msearch', $params);
+ $x = Network::postURL(get_server().'/msearch', $params);
} else {
- $x = post_url(System::baseUrl() . '/msearch', $params);
+ $x = Network::postURL(System::baseUrl() . '/msearch', $params);
}
$j = json_decode($x);
<text x="29" y="1664" style="font:13px Open Sans">getting transmitted (if $aes_allow -> encrypt the the public key)</text>
<text x="29" y="1710" style="font:13px Open Sans"> -> add duplex state and page-flags to the params</text>
<text x="29" y="1756" style="font:13px Open Sans"> -> send params to Bobs dfrn_confirm page ($res = </text>
-<text x="29" y="1779" style="font:13px Open Sans">post_url($dfrn_confirm,$params);</text>
+<text x="29" y="1779" style="font:13px Open Sans">Network::postURL($dfrn_confirm,$params);</text>
<clipPath id="clip11"><path d="M1041,1319 L1619,1319 L1619,1913 L1041,1913 L1041,1319 Z" /></clipPath>
<path d="M1050,1320 C1045.5820313,1320 1042,1323.5820313 1042,1328 L1042,1903 C1042,1907.4179688 1045.5820313,1911 1050,1911 L1609,1911 C1613.4179688,1911 1617,1907.4179688 1617,1903 L1617,1328 C1617,1323.5820313 1613.4179688,1320 1609,1320 Z" style="fill:rgb(255,255,3);stroke:none" clip-path="url(#clip11)" />
<text x="1055" y="1342" style="font:13px Open Sans">dfrn_confirm_post()</text>
logger('dfrn_deliver: ' . "SENDING: " . print_r($postvars, true), LOGGER_DATA);
- $xml = post_url($contact['notify'], $postvars);
+ $xml = Network::postURL($contact['notify'], $postvars);
logger('dfrn_deliver: ' . "RECEIVED: " . $xml, LOGGER_DATA);
if (!intval(Config::get("system", "diaspora_test"))) {
$content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
- post_url($dest_url."/", $envelope, ["Content-Type: ".$content_type]);
+ Network::postURL($dest_url."/", $envelope, ["Content-Type: ".$content_type]);
$return_code = $a->get_curl_code();
} else {
logger("test_mode");
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
- post_url($url, $salmon, [
+ Network::postURL($url, $salmon, [
'Content-type: application/magic-envelope+xml',
'Content-length: ' . strlen($salmon)
]);
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
- post_url($url, $salmon, [
+ Network::postURL($url, $salmon, [
'Content-type: application/magic-envelope+xml',
'Content-length: ' . strlen($salmon)
]);
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
- post_url($url, $salmon, [
+ Network::postURL($url, $salmon, [
'Content-type: application/magic-envelope+xml',
- 'Content-length: ' . strlen($salmon)]
- );
+ 'Content-length: ' . strlen($salmon)]);
$return_code = $a->get_curl_code();
}
if (filter_var($newurl, FILTER_VALIDATE_URL)) {
$redirects++;
logger('post_url: redirect ' . $url . ' to ' . $newurl);
- return post_url($newurl, $params, $headers, $redirects, $timeout);
+ return self::postURL($newurl, $params, $headers, $redirects, $timeout);
}
}
$postvars['dfrn_version'] = DFRN_PROTOCOL_VERSION;
$postvars['perm'] = 'rw';
- $xml = post_url($contact['poll'], $postvars);
+ $xml = Network::postURL($contact['poll'], $postvars);
} elseif (($contact['network'] === NETWORK_OSTATUS)
|| ($contact['network'] === NETWORK_DIASPORA)
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Protocol\OStatus;
+use Friendica\Util\Network;
require_once 'include/items.php';
logger('POST '.print_r($headers, true)."\n".$params, LOGGER_DEBUG);
- post_url($rr['callback_url'], $params, $headers);
+ Network::postURL($rr['callback_url'], $params, $headers);
$ret = $a->get_curl_code();
if ($ret >= 200 && $ret <= 299) {