From 19723c932cad1d7f29db90316d63bcb87564d876 Mon Sep 17 00:00:00 2001
From: Joe Robinson
";
echo "Size: " . size_readable($_FILES["file"]["size"], null, "bi");
+ if (isset($notificationurl)) {
+ send_upload_notification($fileurl);
+ }
}
}
+
+function send_upload_notification($fileurl) {
+ $data = array('url' => $fileurl, 'channel' => $notificationchannel);
+
+ $options = array(
+ 'http' => array(
+ 'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
+ "X-Blaears-Event: blaupload",
+ 'method' => 'POST',
+ 'content' => http_build_query($data),
+ ),
+ );
+ $context = stream_context_create($options);
+ file_get_contents($url, false, $context);
+}
?>
--
cgit v1.2.3
From 07e0c2aa0b5b1866815b8b0f24b0dd3c71d05634 Mon Sep 17 00:00:00 2001
From: Joe Robinson
";
echo "Size: " . size_readable($_FILES["file"]["size"], null, "bi");
- if (isset($notificationurl)) {
- send_upload_notification($fileurl);
+ if (isset($posturl)) {
+ send_upload_notification($fileurl, $posturl, $postchannel);
}
}
}
-function send_upload_notification($fileurl) {
- $data = array('url' => $fileurl, 'channel' => $notificationchannel);
+function send_upload_notification($fileurl, $posturl, $channel) {
+ $data = array('url' => $fileurl, 'channel' => $channel);
$options = array(
'http' => array(
@@ -69,7 +69,7 @@ function send_upload_notification($fileurl) {
),
);
$context = stream_context_create($options);
- file_get_contents($url, false, $context);
+ file_get_contents($posturl, false, $context);
}
?>