Subversion Repositories SmartDukaan

Rev

Rev 11104 | Rev 11109 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11104 Rev 11107
Line 104... Line 104...
104
				log_message('error', 'Mcurl Class - Provided http method is not supported. Only POST and GET are currently supported.');
104
				log_message('error', 'Mcurl Class - Provided http method is not supported. Only POST and GET are currently supported.');
105
				break;
105
				break;
106
		}
106
		}
107
		curl_setopt($this->calls[$key]["curl"], CURLOPT_RETURNTRANSFER, TRUE);
107
		curl_setopt($this->calls[$key]["curl"], CURLOPT_RETURNTRANSFER, TRUE);
108
		curl_setopt($this->calls[$key]["curl"], CURLOPT_FOLLOWLOCATION, TRUE);
108
		curl_setopt($this->calls[$key]["curl"], CURLOPT_FOLLOWLOCATION, TRUE);
-
 
109
		//echo $key;
109
		if($key == 'tracking' || $key == "pay-success" || $key = "register"){
110
		// if(($key == 'tracking')){
110
			$cookiesStringToPass="";
111
		// 	$cookiesStringToPass="";
111
			foreach($_COOKIE as $cookie) {
112
		// 	foreach($_COOKIE as $cookie) {
112
				if ($cookiesStringToPass) {
113
		// 		if ($cookiesStringToPass) {
113
	     			$cookiesStringToPass  .= ';';
114
	 //     			$cookiesStringToPass  .= ';';
114
	    		}
115
	 //    		}
115
	    		if(is_object(json_decode($cookie))){
116
	 //    		if(is_object(json_decode($cookie))){
116
	    			$cookieInfo = json_decode($cookie);
117
	 //    			$cookieInfo = json_decode($cookie);
117
	    			foreach ($cookieInfo as $info) {
118
	 //    			foreach ($cookieInfo as $info) {
118
	    				$cookiesStringToPass .= $info->name . '=' . addslashes($info->value);
119
	 //    				$cookiesStringToPass .= $info->name . '=' . addslashes($info->value);
119
	    			}
120
	 //    			}
120
	    		}
121
	 //    		}
121
			}
122
		// 	}
122
			curl_setopt($this->calls[$key]["curl"], CURLOPT_COOKIE, $cookiesStringToPass);
123
		// 	curl_setopt($this->calls[$key]["curl"], CURLOPT_COOKIE, $cookiesStringToPass);
123
		}
124
		// }
124
		curl_setopt_array($this->calls[$key]["curl"], $options);
125
		curl_setopt_array($this->calls[$key]["curl"], $options);
125
		curl_multi_add_handle($this->curl_parent,$this->calls[$key]["curl"]);		 
126
		curl_multi_add_handle($this->curl_parent,$this->calls[$key]["curl"]);		 
126
	}
127
	}
127
 
128
 
128
	// run the calls in the curl requests in $this->calls
129
	// run the calls in the curl requests in $this->calls