|
| get_capath () |
|
| fetch_url ($url, $binary=false, &$redirects=0, $timeout=0, $accept_content=Null) |
|
| post_url ($url, $params, $headers=null, &$redirects=0, $timeout=0) |
|
| z_fetch_url ($url, $binary=false, $redirects=0, $opts=array()) |
|
| z_post_url ($url, $params, $redirects=0, $opts=array()) |
|
| json_return_and_die ($x) |
|
| xml_status ($st, $message= '') |
|
| http_status_exit ($val, $msg= '') |
|
| convert_xml_element_to_array ($xml_element, &$recursion_depth=0) |
|
| webfinger_dfrn ($s, &$hcard) |
|
| webfinger ($s, $debug=false) |
|
| lrdd ($uri, $debug=false) |
|
| fetch_lrdd_template ($host) |
|
| fetch_xrd_links ($url) |
|
| validate_url (&$url) |
|
| validate_email ($addr) |
|
| allowed_url ($url) |
|
| allowed_email ($email) |
|
| avatar_img ($email) |
|
| parse_xml_string ($s, $strict=true) |
|
| add_fcontact ($arr, $update=false) |
|
| scale_external_images ($s, $include_link=true, $scale_replace=false) |
|
| fix_contact_ssl_policy (&$contact, $new_policy) |
|
| xml2array ($contents, $namespaces=true, $get_attributes=1, $priority= 'attribute') |
|
| email_header_encode ($in_str, $charset) |
|
| email_send ($addr, $subject, $headers, $item) |
|
xml2array |
( |
|
$contents, |
|
|
|
$namespaces = true , |
|
|
|
$get_attributes = 1 , |
|
|
|
$priority = 'attribute' |
|
) |
| |
xml2array() will convert the given XML text to an array in the XML structure. Link: http://www.bin-co.com/php/scripts/xml2array/ Portions significantly re-written by mike@.nosp@m.macg.nosp@m.irvin.nosp@m..com for Friendica (namespaces, lowercase tags, get_attribute default changed, more...) Arguments : $contents - The XML text $namespaces - true or false include namespace information in the returned array as array elements. $get_attributes - 1 or 0. If this is 1 the function will get the attributes as well as the tag values - this results in a different array structure in the return value. $priority - Can be 'tag' or 'attribute'. This will change the way the resulting array sturcture. For 'tag', the tags are given more importance. Return: The parsed XML in an array form. Use print_r() to see the resulting array structure. Examples: $array = xml2array(file_get_contents('feed.xml')); $array = xml2array(file_get_contents('feed.xml', true, 1, 'attribute'));
Referenced by fetch_xrd_links().
z_fetch_url |
( |
|
$url, |
|
|
|
$binary = false , |
|
|
|
$redirects = 0 , |
|
|
|
$opts = array() |
|
) |
| |
z_fetch_url
- Parameters
-
string | $url | URL to fetch |
boolean | $binary | = false TRUE if asked to return binary results (file download) |
int | $redirects | = 0 internal use, recursion counter |
array | $opts | (optional parameters) 'accept_content' => supply Accept: header with 'accept_content' as the value 'timeout' => int seconds, default system config value or 60 seconds 'http_auth' => username:password 'novalidate' => do not validate SSL certs, default is to validate using our CA list |
- Returns
- array 'return_code' => HTTP return code or 0 if timeout or failure 'success' => boolean true (if HTTP 2xx result) or false 'header' => HTTP headers 'body' => fetched content
Referenced by check_htaccess(), directory_content(), import_post(), import_profile_photo(), navbar_complete(), oembed_fetch_url(), oexchange_content(), onepoll_run(), parseurl_getsiteinfo(), poco_load(), setup_post(), z_post_url(), zot_finger(), and zot_register_hub().