Show
Ignore:
Timestamp:
03/19/07 23:38:33 (16 years ago)
Author:
exi
Message:

Fixed a bug which prevented some options from beeing saved properly.
Added code to the http request class to support cookies.
Added a small summary option for the killsummarytables.
System location will now get classified in the battleparser too.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/includes/class.http.php

    r190 r191  
    2121        $this->postdata = array(); 
    2222        $this->headers = array(); 
     23        $this->cookiedata = array(); 
    2324        $this->socket_timeout = 5; 
    2425    } 
     
    2829    // scripts or compressed data streams 
    2930    function setSockettimeout($int) 
     31    { 
     32        $this->socket_timeout = $int; 
     33    } 
     34 
     35    function set_timeout($int) 
    3036    { 
    3137        $this->socket_timeout = $int; 
     
    102108            $request_string .= join($lf, $this->headers).$lf; 
    103109        } 
     110        if (count($this->cookiedata)) 
     111        { 
     112            $request_string .= 'Cookie: '; 
     113            foreach ($this->cookiedata as $key => $value) 
     114            { 
     115                $request_string .= $key.'='.$value.'; '; 
     116            } 
     117            $request_string .= $lf; 
     118        } 
    104119        if ($this->method == 'POST') 
    105120        { 
     
    178193    } 
    179194 
     195    function set_cookie($name, $data) 
     196    { 
     197        $this->cookiedata[$name] = $data; 
     198    } 
     199 
    180200    function set_useragent($string) 
    181201    {