-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreatedrop.php
More file actions
35 lines (31 loc) · 938 Bytes
/
createdrop.php
File metadata and controls
35 lines (31 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
session_start();
if(!isset($_SESSION['user']))
header('location: login.php');
include 'config.php';
$name=(trim($_POST['name']));
$admin=(trim($_POST['admin_password']));
$password=(trim($_POST['password']));
$premium=(trim($_POST['premium_code']));
$expire=($_POST['expiration_length']);
$gca=($_POST['guests_can_add']);
$gcc=($_POST['guests_can_comment']);
$gcd=($_POST['guests_can_delete']);
$ch = curl_init();
$data = array('version' => '1.0');
$data['api_key'] = $apiKey;
$data['name'] = $name;
$data['admin_password'] = $admin;
$data['password'] = $password;
$data['premium_code'] = $premium;
$data['expiration_length'] = $expire;
$data['guests_can_add'] = $gca;
$data['guests_can_comment'] = $gcc;
$data['guests_can_delete'] = $gcd;
$url='http://api.drop.io/drops/';
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_exec($ch);
curl_close($ch);
?>