|
@@ -1,31 +0,0 @@
|
1
|
|
-<?php
|
2
|
|
-
|
3
|
|
-$ch = curl_init();
|
4
|
|
-curl_setopt($ch, CURLOPT_URL,"http://10.11.25.107/auth_basic.php");
|
5
|
|
-curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
6
|
|
-
|
7
|
|
-$headers = apache_request_headers();
|
8
|
|
-
|
9
|
|
-if (!isset($headers['Authorization'])) die('Forbidden');
|
10
|
|
-
|
11
|
|
-$headers = array('Authorization: '.$headers['Authorization']);
|
12
|
|
-
|
13
|
|
-curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
14
|
|
-
|
15
|
|
-$server_output = curl_exec ($ch);
|
16
|
|
-$info = curl_getinfo($ch);
|
17
|
|
-curl_close ($ch);
|
18
|
|
-
|
19
|
|
-if ($info['http_code']!=200) die('Forbidden');
|
20
|
|
-
|
21
|
|
-include "api.php";
|
22
|
|
-
|
23
|
|
-$api = new SQLSRV_CRUD_API(array(
|
24
|
|
- 'hostname'=>'(local)',
|
25
|
|
- 'username'=>'',
|
26
|
|
- 'password'=>'',
|
27
|
|
- 'database'=>'xxx',
|
28
|
|
- 'charset'=>'UTF-8'
|
29
|
|
-));
|
30
|
|
-$api->executeCommand();
|
31
|
|
-
|