Rev 1162 | Rev 1164 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1162 | Rev 1163 | ||
|---|---|---|---|
| Line 291... | Line 291... | ||
| 291 | } |
291 | } |
| 292 | 292 | ||
| 293 | /* Create the buffer by requesting the url through cURL */ |
293 | /* Create the buffer by requesting the url through cURL */ |
| 294 | private function createBuffer($path) |
294 | private function createBuffer($path) |
| 295 | { |
295 | { |
| 296 | global $user; |
- | |
| 297 | global $pass; |
- | |
| 298 | if($this->buffer) |
296 | if($this->buffer) |
| 299 | { |
297 | { |
| 300 | return; |
298 | return; |
| 301 | } |
299 | } |
| 302 | echo "[NTLMStream::createBuffer] create buffer from : $path \n"; |
300 | echo "[NTLMStream::createBuffer] create buffer from : $path \n"; |
| Line 309... | Line 307... | ||
| 309 | curl_setopt($this->ch, CURLOPT_USERPWD, $user.':'.$pass); |
307 | curl_setopt($this->ch, CURLOPT_USERPWD, $user.':'.$pass); |
| 310 | echo $this->buffer = curl_exec($this->ch); |
308 | echo $this->buffer = curl_exec($this->ch); |
| 311 | 309 | ||
| 312 | echo "[NTLMStream::createBuffer] buffer size : ".strlen($this->buffer)."bytes \n"; |
310 | echo "[NTLMStream::createBuffer] buffer size : ".strlen($this->buffer)."bytes \n"; |
| 313 | $this->pos = 0; |
311 | $this->pos = 0; |
| - | 312 | /*$myfile = "/tmp/debugex.txt"; |
|
| - | 313 | $fh = fopen($myfile, 'w+') or die("can't open file"); |
|
| - | 314 | fwrite($fh, "user: ". $this->user. " pass: ".$this->pass."\n"); |
|
| - | 315 | fwrite($fh, "req: ". $request ."loc: ". $location ." act: ". $action ." ver: ". $version."\n"); |
|
| - | 316 | fwrite($fh, "reponse: ". $response."\n\n"); |
|
| - | 317 | fclose($fh); |
|
| - | 318 | */ |
|
| 314 | } |
319 | } |
| 315 | } |
320 | } |
| 316 | 321 | ||
| 317 | ?> |
322 | ?> |