note 102309 added to function.simplexml-load-file

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
A little function very helpfull in using simplexml_load_file behind a proxy

function getXMLfromURL($url) {
      $Proxy = getenv("HTTP_PROXY");

      if (strlen($Proxy) > 1) {
        $r_default_context = stream_context_get_default ( array
                    ('http' => array(
                        'proxy' => $Proxy,
                        'request_fulluri' => True,
                    ),
                )
            );
        libxml_set_streams_context($r_default_context);
      }
      $daten = simplexml_load_file($url);
      return ($daten);
    }

where HTTP_PROXY is set to e.g.: tcp://proxy:8080
----
Server IP: 212.69.189.114
Probable Submitter: 213.150.1.125
----
Manual Page -- http://www.php.net/manual/en/function.simplexml-load-file.php
Edit        -- https://master.php.net/note/edit/102309
Del: integrated  -- https://master.php.net/note/delete/102309/integrated
Del: useless     -- https://master.php.net/note/delete/102309/useless
Del: bad code    -- https://master.php.net/note/delete/102309/bad+code
Del: spam        -- https://master.php.net/note/delete/102309/spam
Del: non-english -- https://master.php.net/note/delete/102309/non-english
Del: in docs     -- https://master.php.net/note/delete/102309/in+docs
Del: other reasons-- https://master.php.net/note/delete/102309
Reject      -- https://master.php.net/note/reject/102309
Search      -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.