Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $username = "ipg3_midas_globe";
- $password = "oymBBw5j4h3D8ltp";
- $secret = "Qxn1PBUsMtarBRLQfXhGkbPdiIGfTZvA";
- $url = 'http://fxwdc0788.forexwebdesign.net/api/v1/';
- $token = $username.'--'.md5($password).'--'.md5($username.$password.$secret).'/';
- $method = "GetAllLeadsStatus";
- $fields = [
- 'start_date' => '2018-10-01',
- 'end_date' => '2018-12-20',
- ];
- $ch = curl_init($url.$token.$method);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
- $data = curl_exec($ch);
- curl_close($ch);
- if(!is_null($data)){
- $get = json_decode($data);
- echo '<pre>';
- print_r($get);
- if(@$get->status_code == 1){
- $obj = $get->object;
- $notRegArray = $obj->not_registered;
- $ftdsArray = $obj->ftd;
- // print_r($ftdsArray);
- if(is_array($ftdsArray)){
- if(count($ftdsArray) > 0){
- foreach($ftdsArray as $ftd) {
- $apiLeadId = $ftd->id;
- $leadStatus = $ftd->account_status;
- $ftdDate = $ftd->ftd_date;
- }
- }
- }
- // print_r($notRegArray);
- if(is_array($notRegArray)){
- if(count($notRegArray) > 0){
- foreach($notRegArray as $notReg) {
- $apiLeadId = $notReg->id;
- $leadStatus = $notReg->lead_status;
- }
- }
- }
- }
- }
- exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement