/
checkreplitoalice.php
69 lines (38 loc) · 1.18 KB
/
checkreplitoalice.php
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
//Team name to be replicated//
$Username=$_COOKIE["Username"];
$result=replicateFile($Username);
return $result;
// echo $result;
// // replicate.php takes $path -> Complete path in the server after saving in server
// // $team->username which would be the file to be copied
function replicateFile($team)
{
// $target_url = 'http://photo-drop.com/curlfile.php';
$target_url = 'http://photo-drop.com/curlfilecheck.php';
$file_name_with_full_path = realpath($path);
$post = array('teamname'=>$team);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$target_url);
curl_setopt($ch, CURLOPT_POST,true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
$resultalice=curl_exec ($ch);
curl_getinfo($ch);
echo "<br>";
curl_errno($ch);
echo curl_error($ch);
curl_close ($ch);
// echo $result;
// if($result)
// {
// echo "File sent";
// }
// else
// {
// echo "File not sent";
// }
// return $resultalice;
return $resultalice;
}
?>