Ticket #7550: 7550.r8841.diff
File 7550.r8841.diff, 1.3 KB (added by , 17 years ago) |
---|
-
http.php
1024 1024 * The array structure is a little complex. 1025 1025 * 1026 1026 * <code> 1027 * $res = array( 'headers' => 1028 * 'response' => array('code', 'message'), 1029 * 'headers' => array() 1030 * ); 1027 * $res = array( 'headers' => array(), 'response' => array('code', 'message') ); 1031 1028 * </code> 1032 1029 * 1033 * All of the headers in $res['headers']['headers'] are with the name as the key 1034 * and the value as the value. So to get the User-Agent, you would do the 1035 * following. 1030 * All of the headers in $res['headers'] are with the name as the key and the 1031 * value as the value. So to get the User-Agent, you would do the following. 1036 1032 * 1037 1033 * <code> 1038 * $user_agent = $res['headers'][' headers']['user-agent'];1034 * $user_agent = $res['headers']['user-agent']; 1039 1035 * </code> 1040 1036 * 1041 1037 * The body is the raw response content and can be retrieved from $res['body']. … … 1043 1039 * This function is called first to make the request and there are other API 1044 1040 * functions to abstract out the above convoluted setup. 1045 1041 * 1046 * @since 2.7 1042 * @since 2.7.0 1047 1043 * 1048 1044 * @param string $url Site URL to retrieve. 1049 1045 * @param array $args Optional. Override the defaults.