Subversion Repositories SmartDukaan

Rev

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

Rev 11107 Rev 11109
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;
-
 
110
		// if(($key == 'tracking')){
109
		if(($key == 'tracking') || ($key == 'signup') || ($key == 'orderconfirmation_process')){
111
		// 	$cookiesStringToPass="";
110
			$cookiesStringToPass="";
112
		// 	foreach($_COOKIE as $cookie) {
111
			foreach($_COOKIE as $cookie) {
113
		// 		if ($cookiesStringToPass) {
112
				if ($cookiesStringToPass) {
114
	 //     			$cookiesStringToPass  .= ';';
113
	     			$cookiesStringToPass  .= ';';
115
	 //    		}
114
	    		}
116
	 //    		if(is_object(json_decode($cookie))){
115
	    		if(is_object(json_decode($cookie))){
117
	 //    			$cookieInfo = json_decode($cookie);
116
	    			$cookieInfo = json_decode($cookie);
118
	 //    			foreach ($cookieInfo as $info) {
117
	    			foreach ($cookieInfo as $info) {
119
	 //    				$cookiesStringToPass .= $info->name . '=' . addslashes($info->value);
118
	    				$cookiesStringToPass .= $info->name . '=' . addslashes($info->value);
120
	 //    			}
119
	    			}
121
	 //    		}
120
	    		}
122
		// 	}
121
			}
123
		// 	curl_setopt($this->calls[$key]["curl"], CURLOPT_COOKIE, $cookiesStringToPass);
122
			curl_setopt($this->calls[$key]["curl"], CURLOPT_COOKIE, $cookiesStringToPass);
124
		// }
123
		}
125
		curl_setopt_array($this->calls[$key]["curl"], $options);
124
		curl_setopt_array($this->calls[$key]["curl"], $options);
126
		curl_multi_add_handle($this->curl_parent,$this->calls[$key]["curl"]);		 
125
		curl_multi_add_handle($this->curl_parent,$this->calls[$key]["curl"]);		 
127
	}
126
	}
128
 
127
 
129
	// run the calls in the curl requests in $this->calls
128
	// run the calls in the curl requests in $this->calls