Changeset 1291028
- Timestamp:
- 11/20/2015 07:57:11 PM (10 years ago)
- File:
-
- 1 edited
-
adblock-x/trunk/adblock-x.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
adblock-x/trunk/adblock-x.php
r1288897 r1291028 90 90 else if ($_SERVER["REQUEST_METHOD"] == "POST") 91 91 { 92 $fname = $_POST['first_name']; 93 $lname = $_POST['last_name']; 94 $email = $_POST['email']; 95 $password = $_POST['password']; 96 $company_name = $_POST['company_name']; 97 $property_name = $_POST['property_name']; 98 $property_url = $_POST['property_url']; 99 100 $url = "rdp.ddc.com/api/v1/user/ab_register"; 101 $post_str = 'debug=1&json={"first_name":"'.$fname.'",'; 102 $post_str .= '"last_name":"'.$lname.'","email":"'.$email.'","password":"'.$password.'",'; 103 $post_str .= '"company_name":"'.$company_name.'","property_name":"'.$property_name.'","property_url":"'.$property_url.'"}'; 92 $url = "adblockx.com/api/v1/user/ab_register"; 93 $post_data = array( 94 'first_name' => $_POST['first_name'], 95 'last_name' => $_POST['last_name'], 96 'email' => $_POST['email'], 97 'password' => $_POST['password'], 98 'company_name' => $_POST['company_name'], 99 'property_name' => $_POST['property_name'], 100 'property_url' => $_POST['property_url'], 101 ); 104 102 105 103 $ch = curl_init(); 106 107 104 curl_setopt($ch, CURLOPT_URL, $url); 108 curl_setopt($ch, CURLOPT_POST, 1);109 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_str);105 curl_setopt($ch, CURLOPT_POST, TRUE); 106 curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_data)); 110 107 curl_setopt($ch, CURLOPT_HEADER, 0); 111 112 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 108 curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); 113 109 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); 114 115 $curl_output = curl_exec ($ch); 116 117 curl_close ($ch); 110 $curl_output = curl_exec($ch); 111 curl_close($ch); 118 112 119 113 $output_arr = json_decode($curl_output);
Note: See TracChangeset
for help on using the changeset viewer.