0byt3m1n1
Path:
/
var
/
www
/
listcrawler.app
/
public_html
/
ajax
/
[
Home
]
File: send-message.php
<?php require '../db.php'; $mobile_number = trim($_REQUEST['mobile_number']); $location_id = ( isset($_REQUEST["location_id"]) && is_numeric($_REQUEST["location_id"]) ) ? $_REQUEST["location_id"] : 0; if ( $location_id == 0 ) { $location_name = ''; } else { $location_name = str_replace(' ', '-', get_location_name($location_id)); } // From URL to get webpage contents. $url = "http://74.208.200.124/api/AutoLeads.aspx?MobileNumber=" . $mobile_number . "&UserName=listcrawler@raincpa.com&Password=makeitrain&city=" . $location_name; $getAPI = "SELECT * from `api_url` WHERE id=1 "; $getAPIResult = mysqli_query($conn, $getAPI); $count_APIResult = mysqli_num_rows($getAPIResult); if ( $count_APIResult > 0 ) { $getAPIResultRow = mysqli_fetch_assoc($getAPIResult); $sep_arg = "?"; if (strpos($getAPIResultRow["base_url"], '?') !== false) { $sep_arg = "&"; } $url = $getAPIResultRow["base_url"] . $sep_arg . $getAPIResultRow["var_mobile_title"] . "=" . $mobile_number . "&" . $getAPIResultRow["var_username_title"] . "=" . $getAPIResultRow["var_username_value"] . "&" . $getAPIResultRow["var_password_title"] . "=" . $getAPIResultRow["var_password_value"] . "&" . $getAPIResultRow["var_city_title"] . "=" . $location_name; } // Initialize a CURL session. $ch = curl_init(); // Return Page contents. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //grab URL and pass it to the variable. curl_setopt($ch, CURLOPT_URL, $url); $result = curl_exec($ch); echo $result; ?>