provide 'session' option to z_fetch_url to assist with remote fetches requiring magic auth

This commit is contained in:
zotlabs
2017-02-27 23:48:54 -08:00
parent df6e75e1d6
commit fa944fc526
2 changed files with 5 additions and 1 deletions

View File

@@ -445,7 +445,7 @@ class Connedit extends \Zotlabs\Web\Controller {
if($cmd === 'fetchvc') {
$url = str_replace('/channel/','/profile/',$orig_record[0]['xchan_url']) . '/vcard';
$recurse = 0;
$x = z_fetch_url(zid($url),false,$recurse,['headers' => ['Cookie: PHPSESSID=' . session_id()]]);
$x = z_fetch_url(zid($url),false,$recurse,['session' => true]);
if($x['success']) {
$h = new \Zotlabs\Web\HTTPHeaders($x['header']);
$fields = $h->fetch();