-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplag.php
30 lines (24 loc) · 823 Bytes
/
plag.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
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->addForm(NULL, array(
array(
'name' => 'file_path',
'type' => 'application/octet-stream',
'file' => 'hodlistemp.html',
'data' => null
)
));
$request->setRequestUrl('https://plagspotter-duplicate-content-checking.p.rapidapi.com/v2.add-file-for-checking');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders(array(
'x-rapidapi-host' => 'plagspotter-duplicate-content-checking.p.rapidapi.com',
'x-rapidapi-key' => 'b5155e42c6msh87aca93b5da4ec3p1aafc7jsn3d4cbe2b75d4',
'authorization' => 'Basic TmlzaGFkMDA6TmlzaGFkQDEyMw==',
'content-type' => 'multipart/form-data'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();