<?php
defined('BASEPATH') or exit('No Direct Access Allowed');
class Sendresponse extends CI_Controller{

	public function __construct(){
	if(isset($_SERVER['REMOTE_ADDR'])) {
    	die('Dont Try!');
	}
	parent::__construct();
	}	
	
	public function index()
	{	
    	$getdetail=$this->getset->getResponseForCron();
    	
    	if($getdetail)
        	foreach($getdetail as $vdetail)
        	{
            	$tran_id=$vdetail['tid'];
            	$oid=$vdetail['offer_id'];
            	$id=$vdetail['cid'];
         	    $getstatus=$this->setval->getsData($tran_id,$id,$oid);
         	
        	if($getstatus!==false)
            	{ 
                	$getdetails=$this->getset->setResponse($id,$oid,$tran_id);
                	echo"Updated \n";
            	}	
        	}	
    }

} 





