-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhail.php
More file actions
41 lines (29 loc) · 1.05 KB
/
hail.php
File metadata and controls
41 lines (29 loc) · 1.05 KB
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
<?php
include 'config.php';
//$phone_no = $_POST['phone_no'];
//$otp = $_POST['otp'];
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$property = $_POST['property'];
$intend = $_POST['intend'];
$size = $_POST['size'];
$budget = $_POST['budget'];
$lat = $_POST['lat'];
$long = $_POST['long'];
$mob_no = $_POST['phone_no'];
$json =
$url = 'http://52.25.136.179:9000/1/web/oye/';
$data = array('mobile_no'=>$mob_no,'long'=>$long,'lat'=>$lat,'spec_code'=>"$property-$intend-$size-$budget");
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
curl_setopt($curl, CURLOPT_IPRESOLVE, 'CURL_VERSION_IPV6');
$json_response = curl_exec($curl);
?>