mirror of
https://github.com/friendica/friendica
synced 2025-04-28 11:44:23 +02:00
Review update
Rename function, move others
This commit is contained in:
parent
0f1be37279
commit
f04d40a37e
55 changed files with 331 additions and 326 deletions
|
@ -793,7 +793,7 @@ class DFRN
|
|||
if ($activity) {
|
||||
$entry = $doc->createElement($element);
|
||||
|
||||
$r = Network::parseXmlString($activity, false);
|
||||
$r = XML::parseString($activity, false);
|
||||
if (!$r) {
|
||||
return false;
|
||||
}
|
||||
|
@ -816,7 +816,7 @@ class DFRN
|
|||
$r->link = preg_replace('/\<link(.*?)\"\>/', '<link$1"/>', $r->link);
|
||||
|
||||
// XML does need a single element as root element so we add a dummy element here
|
||||
$data = Network::parseXmlString("<dummy>" . $r->link . "</dummy>", false);
|
||||
$data = XML::parseString("<dummy>" . $r->link . "</dummy>", false);
|
||||
if (is_object($data)) {
|
||||
foreach ($data->link as $link) {
|
||||
$attributes = [];
|
||||
|
@ -1187,7 +1187,7 @@ class DFRN
|
|||
|
||||
logger('dfrn_deliver: ' . $url);
|
||||
|
||||
$ret = Network::zFetchURL($url);
|
||||
$ret = Network::curl($url);
|
||||
|
||||
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
||||
return -2; // timed out
|
||||
|
@ -1212,7 +1212,7 @@ class DFRN
|
|||
return 3;
|
||||
}
|
||||
|
||||
$res = Network::parseXmlString($xml);
|
||||
$res = XML::parseString($xml);
|
||||
|
||||
if ((intval($res->status) != 0) || (! strlen($res->challenge)) || (! strlen($res->dfrn_id))) {
|
||||
return (($res->status) ? $res->status : 3);
|
||||
|
@ -1333,7 +1333,7 @@ class DFRN
|
|||
|
||||
logger('dfrn_deliver: ' . "SENDING: " . print_r($postvars, true), LOGGER_DATA);
|
||||
|
||||
$xml = Network::postURL($contact['notify'], $postvars);
|
||||
$xml = Network::post($contact['notify'], $postvars);
|
||||
|
||||
logger('dfrn_deliver: ' . "RECEIVED: " . $xml, LOGGER_DATA);
|
||||
|
||||
|
@ -1357,7 +1357,7 @@ class DFRN
|
|||
Contact::unmarkForArchival($contact);
|
||||
}
|
||||
|
||||
$res = Network::parseXmlString($xml);
|
||||
$res = XML::parseString($xml);
|
||||
|
||||
if (!isset($res->status)) {
|
||||
return -11;
|
||||
|
@ -2188,7 +2188,7 @@ class DFRN
|
|||
if (!$verb) {
|
||||
return;
|
||||
}
|
||||
$xo = Network::parseXmlString($item["object"], false);
|
||||
$xo = XML::parseString($item["object"], false);
|
||||
|
||||
if (($xo->type == ACTIVITY_OBJ_PERSON) && ($xo->id)) {
|
||||
// somebody was poked/prodded. Was it me?
|
||||
|
@ -2310,8 +2310,8 @@ class DFRN
|
|||
}
|
||||
|
||||
if (($item["verb"] == ACTIVITY_TAG) && ($item["object-type"] == ACTIVITY_OBJ_TAGTERM)) {
|
||||
$xo = Network::parseXmlString($item["object"], false);
|
||||
$xt = Network::parseXmlString($item["target"], false);
|
||||
$xo = XML::parseString($item["object"], false);
|
||||
$xt = XML::parseString($item["target"], false);
|
||||
|
||||
if ($xt->type == ACTIVITY_OBJ_NOTE) {
|
||||
$r = q(
|
||||
|
@ -2518,7 +2518,7 @@ class DFRN
|
|||
$item["object"] = self::transformActivity($xpath, $object, "object");
|
||||
|
||||
if (trim($item["object"]) != "") {
|
||||
$r = Network::parseXmlString($item["object"], false);
|
||||
$r = XML::parseString($item["object"], false);
|
||||
if (isset($r->type)) {
|
||||
$item["object-type"] = $r->type;
|
||||
}
|
||||
|
@ -2787,8 +2787,8 @@ class DFRN
|
|||
}
|
||||
|
||||
if (($item["verb"] == ACTIVITY_TAG) && ($item["object-type"] == ACTIVITY_OBJ_TAGTERM)) {
|
||||
$xo = Network::parseXmlString($item["object"], false);
|
||||
$xt = Network::parseXmlString($item["target"], false);
|
||||
$xo = XML::parseString($item["object"], false);
|
||||
$xt = XML::parseString($item["target"], false);
|
||||
|
||||
if ($xt->type == ACTIVITY_OBJ_NOTE) {
|
||||
$i = q(
|
||||
|
|
|
@ -186,7 +186,7 @@ class Diaspora
|
|||
*/
|
||||
private static function verifyMagicEnvelope($envelope)
|
||||
{
|
||||
$basedom = Network::parseXmlString($envelope);
|
||||
$basedom = XML::parseString($envelope);
|
||||
|
||||
if (!is_object($basedom)) {
|
||||
logger("Envelope is no XML file");
|
||||
|
@ -296,7 +296,7 @@ class Diaspora
|
|||
$xml = $raw;
|
||||
}
|
||||
|
||||
$basedom = Network::parseXmlString($xml);
|
||||
$basedom = XML::parseString($xml);
|
||||
|
||||
if (!is_object($basedom)) {
|
||||
logger('Received data does not seem to be an XML. Discarding. '.$xml);
|
||||
|
@ -347,7 +347,7 @@ class Diaspora
|
|||
public static function decode($importer, $xml)
|
||||
{
|
||||
$public = false;
|
||||
$basedom = Network::parseXmlString($xml);
|
||||
$basedom = XML::parseString($xml);
|
||||
|
||||
if (!is_object($basedom)) {
|
||||
logger("XML is not parseable.");
|
||||
|
@ -381,7 +381,7 @@ class Diaspora
|
|||
$decrypted = self::aesDecrypt($outer_key, $outer_iv, $ciphertext);
|
||||
|
||||
logger('decrypted: '.$decrypted, LOGGER_DEBUG);
|
||||
$idom = Network::parseXmlString($decrypted);
|
||||
$idom = XML::parseString($decrypted);
|
||||
|
||||
$inner_iv = base64_decode($idom->iv);
|
||||
$inner_aes_key = base64_decode($idom->aes_key);
|
||||
|
@ -631,7 +631,7 @@ class Diaspora
|
|||
*/
|
||||
private static function validPosting($msg)
|
||||
{
|
||||
$data = Network::parseXmlString($msg["message"]);
|
||||
$data = XML::parseString($msg["message"]);
|
||||
|
||||
if (!is_object($data)) {
|
||||
logger("No valid XML ".$msg["message"], LOGGER_DEBUG);
|
||||
|
@ -1257,7 +1257,7 @@ class Diaspora
|
|||
|
||||
logger("Fetch post from ".$source_url, LOGGER_DEBUG);
|
||||
|
||||
$envelope = Network::fetchURL($source_url);
|
||||
$envelope = Network::fetchUrl($source_url);
|
||||
if ($envelope) {
|
||||
logger("Envelope was fetched.", LOGGER_DEBUG);
|
||||
$x = self::verifyMagicEnvelope($envelope);
|
||||
|
@ -1275,13 +1275,13 @@ class Diaspora
|
|||
$source_url = $server."/p/".urlencode($guid).".xml";
|
||||
logger("Fetch post from ".$source_url, LOGGER_DEBUG);
|
||||
|
||||
$x = Network::fetchURL($source_url);
|
||||
$x = Network::fetchUrl($source_url);
|
||||
if (!$x) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$source_xml = Network::parseXmlString($x);
|
||||
$source_xml = XML::parseString($x);
|
||||
|
||||
if (!is_object($source_xml)) {
|
||||
return false;
|
||||
|
@ -3229,7 +3229,7 @@ class Diaspora
|
|||
if (!intval(Config::get("system", "diaspora_test"))) {
|
||||
$content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
|
||||
|
||||
Network::postURL($dest_url."/", $envelope, ["Content-Type: ".$content_type]);
|
||||
Network::post($dest_url."/", $envelope, ["Content-Type: ".$content_type]);
|
||||
$return_code = $a->get_curl_code();
|
||||
} else {
|
||||
logger("test_mode");
|
||||
|
|
|
@ -244,7 +244,7 @@ class Feed {
|
|||
|
||||
$orig_plink = $item["plink"];
|
||||
|
||||
$item["plink"] = Network::originalURL($item["plink"]);
|
||||
$item["plink"] = Network::finalUrl($item["plink"]);
|
||||
|
||||
$item["parent-uri"] = $item["uri"];
|
||||
|
||||
|
|
|
@ -726,7 +726,7 @@ class OStatus
|
|||
|
||||
self::$conv_list[$conversation] = true;
|
||||
|
||||
$conversation_data = Network::zFetchURL($conversation, false, $redirects, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
$conversation_data = Network::curl($conversation, false, $redirects, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
|
||||
if (!$conversation_data['success']) {
|
||||
return;
|
||||
|
@ -754,7 +754,7 @@ class OStatus
|
|||
}
|
||||
}
|
||||
if ($file != '') {
|
||||
$conversation_atom = Network::zFetchURL($attribute['href']);
|
||||
$conversation_atom = Network::curl($attribute['href']);
|
||||
|
||||
if ($conversation_atom['success']) {
|
||||
$xml = $conversation_atom['body'];
|
||||
|
@ -870,7 +870,7 @@ class OStatus
|
|||
return;
|
||||
}
|
||||
|
||||
$self_data = Network::zFetchURL($self);
|
||||
$self_data = Network::curl($self);
|
||||
|
||||
if (!$self_data['success']) {
|
||||
return;
|
||||
|
@ -915,7 +915,7 @@ class OStatus
|
|||
}
|
||||
|
||||
$stored = false;
|
||||
$related_data = Network::zFetchURL($related, false, $redirects, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
$related_data = Network::curl($related, false, $redirects, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
|
||||
if (!$related_data['success']) {
|
||||
return;
|
||||
|
@ -946,7 +946,7 @@ class OStatus
|
|||
}
|
||||
}
|
||||
if ($atom_file != '') {
|
||||
$related_atom = Network::zFetchURL($atom_file);
|
||||
$related_atom = Network::curl($atom_file);
|
||||
|
||||
if ($related_atom['success']) {
|
||||
logger('Fetched XML for URI '.$related_uri, LOGGER_DEBUG);
|
||||
|
@ -958,7 +958,7 @@ class OStatus
|
|||
|
||||
// Workaround for older GNU Social servers
|
||||
if (($xml == '') && strstr($related, '/notice/')) {
|
||||
$related_atom = Network::zFetchURL(str_replace('/notice/', '/api/statuses/show/', $related).'.atom');
|
||||
$related_atom = Network::curl(str_replace('/notice/', '/api/statuses/show/', $related).'.atom');
|
||||
|
||||
if ($related_atom['success']) {
|
||||
logger('GNU Social workaround to fetch XML for URI '.$related_uri, LOGGER_DEBUG);
|
||||
|
@ -969,7 +969,7 @@ class OStatus
|
|||
// Even more worse workaround for GNU Social ;-)
|
||||
if ($xml == '') {
|
||||
$related_guess = OStatus::convertHref($related_uri);
|
||||
$related_atom = Network::zFetchURL(str_replace('/notice/', '/api/statuses/show/', $related_guess).'.atom');
|
||||
$related_atom = Network::curl(str_replace('/notice/', '/api/statuses/show/', $related_guess).'.atom');
|
||||
|
||||
if ($related_atom['success']) {
|
||||
logger('GNU Social workaround 2 to fetch XML for URI '.$related_uri, LOGGER_DEBUG);
|
||||
|
|
|
@ -85,7 +85,7 @@ class PortableContact
|
|||
|
||||
logger('load: ' . $url, LOGGER_DEBUG);
|
||||
|
||||
$s = Network::fetchURL($url);
|
||||
$s = Network::fetchUrl($url);
|
||||
|
||||
logger('load: returns ' . $s, LOGGER_DATA);
|
||||
|
||||
|
@ -287,7 +287,7 @@ class PortableContact
|
|||
}
|
||||
|
||||
// Fetch the host-meta to check if this really is a server
|
||||
$serverret = Network::zFetchURL($server_url."/.well-known/host-meta");
|
||||
$serverret = Network::curl($server_url."/.well-known/host-meta");
|
||||
if (!$serverret["success"]) {
|
||||
return "";
|
||||
}
|
||||
|
@ -366,7 +366,7 @@ class PortableContact
|
|||
$server = q("SELECT `noscrape`, `network` FROM `gserver` WHERE `nurl` = '%s' AND `noscrape` != ''", dbesc(normalise_link($server_url)));
|
||||
|
||||
if ($server) {
|
||||
$noscraperet = Network::zFetchURL($server[0]["noscrape"]."/".$gcontacts[0]["nick"]);
|
||||
$noscraperet = Network::curl($server[0]["noscrape"]."/".$gcontacts[0]["nick"]);
|
||||
|
||||
if ($noscraperet["success"] && ($noscraperet["body"] != "")) {
|
||||
$noscrape = json_decode($noscraperet["body"], true);
|
||||
|
@ -480,7 +480,7 @@ class PortableContact
|
|||
|
||||
GContact::update($contact);
|
||||
|
||||
$feedret = Network::zFetchURL($data["poll"]);
|
||||
$feedret = Network::curl($data["poll"]);
|
||||
|
||||
if (!$feedret["success"]) {
|
||||
$fields = ['last_failure' => datetime_convert()];
|
||||
|
@ -631,7 +631,7 @@ class PortableContact
|
|||
*/
|
||||
private static function fetchNodeinfo($server_url)
|
||||
{
|
||||
$serverret = Network::zFetchURL($server_url."/.well-known/nodeinfo");
|
||||
$serverret = Network::curl($server_url."/.well-known/nodeinfo");
|
||||
if (!$serverret["success"]) {
|
||||
return false;
|
||||
}
|
||||
|
@ -663,7 +663,7 @@ class PortableContact
|
|||
return false;
|
||||
}
|
||||
|
||||
$serverret = Network::zFetchURL($nodeinfo_url);
|
||||
$serverret = Network::curl($nodeinfo_url);
|
||||
if (!$serverret["success"]) {
|
||||
return false;
|
||||
}
|
||||
|
@ -872,7 +872,7 @@ class PortableContact
|
|||
$server_url = str_replace("http://", "https://", $server_url);
|
||||
|
||||
// We set the timeout to 20 seconds since this operation should be done in no time if the server was vital
|
||||
$serverret = Network::zFetchURL($server_url."/.well-known/host-meta", false, $redirects, ['timeout' => 20]);
|
||||
$serverret = Network::curl($server_url."/.well-known/host-meta", false, $redirects, ['timeout' => 20]);
|
||||
|
||||
// Quit if there is a timeout.
|
||||
// But we want to make sure to only quit if we are mostly sure that this server url fits.
|
||||
|
@ -889,7 +889,7 @@ class PortableContact
|
|||
$server_url = str_replace("https://", "http://", $server_url);
|
||||
|
||||
// We set the timeout to 20 seconds since this operation should be done in no time if the server was vital
|
||||
$serverret = Network::zFetchURL($server_url."/.well-known/host-meta", false, $redirects, ['timeout' => 20]);
|
||||
$serverret = Network::curl($server_url."/.well-known/host-meta", false, $redirects, ['timeout' => 20]);
|
||||
|
||||
// Quit if there is a timeout
|
||||
if ($serverret['errno'] == CURLE_OPERATION_TIMEDOUT) {
|
||||
|
@ -925,7 +925,7 @@ class PortableContact
|
|||
|
||||
// Look for poco
|
||||
if (!$failure) {
|
||||
$serverret = Network::zFetchURL($server_url."/poco");
|
||||
$serverret = Network::curl($server_url."/poco");
|
||||
if ($serverret["success"]) {
|
||||
$data = json_decode($serverret["body"]);
|
||||
if (isset($data->totalResults)) {
|
||||
|
@ -951,7 +951,7 @@ class PortableContact
|
|||
|
||||
if (!$failure) {
|
||||
// Test for Diaspora, Hubzilla, Mastodon or older Friendica servers
|
||||
$serverret = Network::zFetchURL($server_url);
|
||||
$serverret = Network::curl($server_url);
|
||||
|
||||
if (!$serverret["success"] || ($serverret["body"] == "")) {
|
||||
$failure = true;
|
||||
|
@ -990,7 +990,7 @@ class PortableContact
|
|||
// Test for Statusnet
|
||||
// Will also return data for Friendica and GNU Social - but it will be overwritten later
|
||||
// The "not implemented" is a special treatment for really, really old Friendica versions
|
||||
$serverret = Network::zFetchURL($server_url."/api/statusnet/version.json");
|
||||
$serverret = Network::curl($server_url."/api/statusnet/version.json");
|
||||
if ($serverret["success"] && ($serverret["body"] != '{"error":"not implemented"}') &&
|
||||
($serverret["body"] != '') && (strlen($serverret["body"]) < 30)) {
|
||||
$platform = "StatusNet";
|
||||
|
@ -1001,7 +1001,7 @@ class PortableContact
|
|||
}
|
||||
|
||||
// Test for GNU Social
|
||||
$serverret = Network::zFetchURL($server_url."/api/gnusocial/version.json");
|
||||
$serverret = Network::curl($server_url."/api/gnusocial/version.json");
|
||||
if ($serverret["success"] && ($serverret["body"] != '{"error":"not implemented"}') &&
|
||||
($serverret["body"] != '') && (strlen($serverret["body"]) < 30)) {
|
||||
$platform = "GNU Social";
|
||||
|
@ -1013,7 +1013,7 @@ class PortableContact
|
|||
|
||||
// Test for Mastodon
|
||||
$orig_version = $version;
|
||||
$serverret = Network::zFetchURL($server_url."/api/v1/instance");
|
||||
$serverret = Network::curl($server_url."/api/v1/instance");
|
||||
if ($serverret["success"] && ($serverret["body"] != '')) {
|
||||
$data = json_decode($serverret["body"]);
|
||||
|
||||
|
@ -1036,7 +1036,7 @@ class PortableContact
|
|||
|
||||
if (!$failure) {
|
||||
// Test for Hubzilla and Red
|
||||
$serverret = Network::zFetchURL($server_url."/siteinfo.json");
|
||||
$serverret = Network::curl($server_url."/siteinfo.json");
|
||||
if ($serverret["success"]) {
|
||||
$data = json_decode($serverret["body"]);
|
||||
if (isset($data->url)) {
|
||||
|
@ -1064,7 +1064,7 @@ class PortableContact
|
|||
}
|
||||
} else {
|
||||
// Test for Hubzilla, Redmatrix or Friendica
|
||||
$serverret = Network::zFetchURL($server_url."/api/statusnet/config.json");
|
||||
$serverret = Network::curl($server_url."/api/statusnet/config.json");
|
||||
if ($serverret["success"]) {
|
||||
$data = json_decode($serverret["body"]);
|
||||
if (isset($data->site->server)) {
|
||||
|
@ -1119,7 +1119,7 @@ class PortableContact
|
|||
|
||||
// Query statistics.json. Optional package for Diaspora, Friendica and Redmatrix
|
||||
if (!$failure) {
|
||||
$serverret = Network::zFetchURL($server_url."/statistics.json");
|
||||
$serverret = Network::curl($server_url."/statistics.json");
|
||||
if ($serverret["success"]) {
|
||||
$data = json_decode($serverret["body"]);
|
||||
|
||||
|
@ -1181,10 +1181,10 @@ class PortableContact
|
|||
// Check for noscrape
|
||||
// Friendica servers could be detected as OStatus servers
|
||||
if (!$failure && in_array($network, [NETWORK_DFRN, NETWORK_OSTATUS])) {
|
||||
$serverret = Network::zFetchURL($server_url."/friendica/json");
|
||||
$serverret = Network::curl($server_url."/friendica/json");
|
||||
|
||||
if (!$serverret["success"]) {
|
||||
$serverret = Network::zFetchURL($server_url."/friendika/json");
|
||||
$serverret = Network::curl($server_url."/friendika/json");
|
||||
}
|
||||
|
||||
if ($serverret["success"]) {
|
||||
|
@ -1294,7 +1294,7 @@ class PortableContact
|
|||
*/
|
||||
private static function fetchServerlist($poco)
|
||||
{
|
||||
$serverret = Network::zFetchURL($poco."/@server");
|
||||
$serverret = Network::curl($poco."/@server");
|
||||
if (!$serverret["success"]) {
|
||||
return;
|
||||
}
|
||||
|
@ -1343,7 +1343,7 @@ class PortableContact
|
|||
if (!empty($accesstoken)) {
|
||||
$api = 'https://instances.social/api/1.0/instances/list?count=0';
|
||||
$header = ['Authorization: Bearer '.$accesstoken];
|
||||
$serverdata = Network::zFetchURL($api, false, $redirects, ['headers' => $header]);
|
||||
$serverdata = Network::curl($api, false, $redirects, ['headers' => $header]);
|
||||
if ($serverdata['success']) {
|
||||
$servers = json_decode($serverdata['body']);
|
||||
foreach ($servers->instances as $server) {
|
||||
|
@ -1360,7 +1360,7 @@ class PortableContact
|
|||
//if (!Config::get('system','ostatus_disabled')) {
|
||||
// $serverdata = "http://gstools.org/api/get_open_instances/";
|
||||
|
||||
// $result = Network::zFetchURL($serverdata);
|
||||
// $result = Network::curl($serverdata);
|
||||
// if ($result["success"]) {
|
||||
// $servers = json_decode($result["body"]);
|
||||
|
||||
|
@ -1389,7 +1389,7 @@ class PortableContact
|
|||
|
||||
logger("Fetch all users from the server ".$server["url"], LOGGER_DEBUG);
|
||||
|
||||
$retdata = Network::zFetchURL($url);
|
||||
$retdata = Network::curl($url);
|
||||
if ($retdata["success"]) {
|
||||
$data = json_decode($retdata["body"]);
|
||||
|
||||
|
@ -1408,7 +1408,7 @@ class PortableContact
|
|||
|
||||
$success = false;
|
||||
|
||||
$retdata = Network::zFetchURL($url);
|
||||
$retdata = Network::curl($url);
|
||||
if ($retdata["success"]) {
|
||||
logger("Fetch all global contacts from the server ".$server["nurl"], LOGGER_DEBUG);
|
||||
$success = self::discoverServer(json_decode($retdata["body"]));
|
||||
|
@ -1493,7 +1493,7 @@ class PortableContact
|
|||
// Fetch all contacts from a given user from the other server
|
||||
$url = $server["poco"]."/".$username."/?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,gender,contactType,generation";
|
||||
|
||||
$retdata = Network::zFetchURL($url);
|
||||
$retdata = Network::curl($url);
|
||||
if ($retdata["success"]) {
|
||||
self::discoverServer(json_decode($retdata["body"]), 3);
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ class Salmon
|
|||
$ret[$x] = substr($ret[$x], 5);
|
||||
}
|
||||
} elseif (normalise_link($ret[$x]) == 'http://') {
|
||||
$ret[$x] = Network::fetchURL($ret[$x]);
|
||||
$ret[$x] = Network::fetchUrl($ret[$x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ class Salmon
|
|||
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
|
||||
|
||||
// slap them
|
||||
Network::postURL($url, $salmon, [
|
||||
Network::post($url, $salmon, [
|
||||
'Content-type: application/magic-envelope+xml',
|
||||
'Content-length: ' . strlen($salmon)
|
||||
]);
|
||||
|
@ -159,7 +159,7 @@ class Salmon
|
|||
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
|
||||
|
||||
// slap them
|
||||
Network::postURL($url, $salmon, [
|
||||
Network::post($url, $salmon, [
|
||||
'Content-type: application/magic-envelope+xml',
|
||||
'Content-length: ' . strlen($salmon)
|
||||
]);
|
||||
|
@ -182,7 +182,7 @@ class Salmon
|
|||
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
|
||||
|
||||
// slap them
|
||||
Network::postURL($url, $salmon, [
|
||||
Network::post($url, $salmon, [
|
||||
'Content-type: application/magic-envelope+xml',
|
||||
'Content-length: ' . strlen($salmon)]);
|
||||
$return_code = $a->get_curl_code();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue