private $baseurl;
private $db;
+ private $curl_code;
+
function __construct() {
$this->config = array();
));
}
+ function set_curl_code($code) {
+ $this->curl_code = $code;
+ }
+
+ function get_curl_code() {
+ return $this->curl_code;
+ }
+
}}
// retrieve the App structure
curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
$s = curl_exec($ch);
+ $info = curl_getinfo($ch);
+ $a = get_app();
+ $a->set_curl_code($info['http_code']);
curl_close($ch);
return($s);
}}
}
$s = curl_exec($ch);
+ $info = curl_getinfo($ch);
+ $a = get_app();
+ $a->set_curl_code($info['http_code']);
curl_close($ch);
return($s);
}}
if((strlen($hub)) && ($notify_hub)) {
$params = 'hub.mode=publish&hub.url=' . urlencode($a->get_baseurl() . '/dfrn_poll/' . $owner['nickname'] );
post_url($hub,$params);
+ if($debugging) {
+ file_put_contents('pubsub.out', "\n\n" . "Pinged hub at " . datetime_convert() . "\n" . "Hub returned " . $a->get_curl_code() . "\n\n" , FILE_APPEND);
+ }
}
killme();
function photos_post(&$a) {
- if(! local_user()) {
- notice( t('Permission denied.') . EOL );
- killme();
- }
-
+ if(! local_user()) {
+ notice( t('Permission denied.') . EOL );
+ killme();
+ }
$r = q("SELECT `contact`.* `user`.`nickname` FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid`