forked from nmynarcik/darkfalluw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproxy.php
16 lines (15 loc) · 819 Bytes
/
proxy.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
// PHP Proxy
// Loads a XML from any location. Used with Flash/Flex apps to bypass security restrictions
// Author: Paulo Fierro
// January 29, 2006
// usage: proxy.php?url=http://mysite.com/myxml.xml
$session = curl_init($_GET['url']); // Open the Curl session
curl_setopt($session, CURLOPT_HEADER, false); // Don't return HTTP headers
curl_setopt($session, CURLOPT_RETURNTRANSFER, true); // Do return the contents of the call
curl_setopt($session, CURLOPT_TIMEOUT, 5); // Do return the contents of the call
$xml = curl_exec($session); // Make the call
header("Content-Type: text/xml"); // Set the content type appropriately
echo $xml; // Spit out the xml
curl_close($session); // And close the session
?>