Advertisement
EddieKidiw

New Phproxy 0.5b2 with ISP Information

Dec 21st, 2015
770
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 59.61 KB | None | 0 0
  1. <?php
  2.  
  3. /* PHProxy 0.5b2 */
  4. /* Multi select user agent */
  5.  
  6. function function_untuk_halaman_awal_kalo_mau_edit_tampilannya_silahkan_edit_dalam_function_ini($data){?>
  7.  
  8. <!-- Mulai mengedit dari sini ( header ) -->
  9.  
  10. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  11. <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
  12. <head>
  13.  
  14. <!-- Di sini Judulnya -->
  15.  
  16.   <title>PHProxy | Eddie Kidiw</title>
  17.  
  18. <!-- Disini css -->
  19. <script type="text/javascript" src="https://googledrive.com/host/0By75od5Jv_hDa2RpVlJReHpzOUk"></script>
  20.   <style type="text/css">
  21. /* Default Theme */
  22. body, input, select, option
  23. {
  24.     font-family: "Bitstream Vera Sans", Arial, Helvetica, sans-serif;
  25.     color: #44352C;
  26. }
  27.  
  28. a
  29. {
  30.     color: #9B9C83;
  31.     text-decoration:none;
  32.     border-bottom: 1px orange dashed;
  33. }
  34.  
  35. a:hover
  36. {
  37.     color: #0080FF;
  38. }
  39.  
  40. #container
  41. {
  42.     border: 1px #9B9C83 solid;
  43.     -moz-border-radius: 8px;
  44.     margin: auto;
  45.     padding: 5px;
  46.     width: 700px;
  47. }
  48.  
  49. #title
  50. {
  51.     color: #CC6633;
  52.     margin: 0;
  53. }
  54.  
  55. ul#navigation, ul#form
  56. {
  57.     list-style-type: none;
  58.     padding: 0;
  59.     margin: 0;
  60. }
  61.  
  62. ul#navigation
  63. {
  64.     float: right;
  65. }
  66.  
  67. ul#form
  68. {
  69.     clear: both;
  70. }
  71.  
  72. ul#navigation li
  73. {
  74.     float: left;
  75.     margin: 0;
  76.     padding: 5px 0;
  77.     border-top: 2px #BFAA9B solid;
  78. }
  79.  
  80. ul#navigation li a
  81. {
  82.     font-weight: bold;
  83.     color: #ffffff;
  84.     background-color: #AA8E79;
  85.     padding: 5px 15px;
  86.     margin-left: 1px;
  87.     text-decoration: none;
  88.     border-bottom: 0 #ffffff solid;
  89. }
  90.  
  91. ul#navigation li  a:hover
  92. {
  93.     color: #44352C;
  94. }
  95.  
  96. ul#form li
  97. {
  98.     width: 700px;
  99. }
  100.  
  101. #footer
  102. {
  103.     color: #9B9C83;
  104.     font-size: small;
  105.     text-align: right;
  106. }
  107.  
  108. #address_bar
  109. {
  110.     border-top: 2px #BFAA9B solid;
  111.     border-bottom: 3px #44352C solid;
  112.     background-color: #AA8E79;
  113.     text-align: center;
  114.     padding: 5px 0;
  115.     color: #ffffff;
  116. }
  117.  
  118. #go
  119. {
  120.     background-color: #ffffff;
  121.     font-weight: bold;
  122.     color: #AA8E79;
  123.     border: 0 #ffffff solid;
  124.     padding: 2px 5px;
  125. }
  126.  
  127. #address_box
  128. {
  129.     width: 500px;
  130. }
  131.  
  132. .option
  133. {
  134.     padding: 2px 0;
  135.     background-color: #EEEBEA;
  136. }
  137.  
  138. .option label
  139. {
  140.     border-bottom: 2px #ffffff solid;
  141. }
  142.  
  143. form
  144. {
  145.     margin: 0;
  146. }
  147.  
  148. #error, #auth
  149. {
  150.     background-color: #BF6464;
  151.     border-top: 1px solid #44352C;
  152.     border-bottom: 1px solid #44352C;
  153.     width: 700px;
  154.     clear: both;
  155. }
  156.  
  157. #auth
  158. {
  159.     background-color: #94C261;
  160. }
  161.  
  162. #error p, #auth p, #auth form
  163. {
  164.     margin: 5px;
  165. }
  166. </style>
  167.  
  168. <!-- Css selesai -->
  169.  
  170. </head>
  171. <body onload="document.getElementById('address_box').focus()">
  172. <div id="container">
  173.   <h1 id="title">PHProxy</h1>
  174.   <ul id="navigation">
  175.     <li><a href="<?php echo $GLOBALS['_script_base'] ?>">URL Form</a></li>
  176.     <li><a href="javascript:alert('cookie managment has not been implemented yet')">Manage Cookies</a></li>
  177.   </ul>
  178.  
  179. <?php
  180.  
  181. switch ($data['category'])
  182. {
  183.     case 'auth':
  184. ?>
  185.   <div id="auth"><p>
  186.   <b>Enter your username and password for "<?php echo htmlspecialchars($data['realm']) ?>" on <?php echo $GLOBALS['_url_parts']['host'] ?></b>
  187.   <form method="post" action="">
  188.     <input type="hidden" name="<?php echo $GLOBALS['_config']['basic_auth_var_name'] ?>" value="<?php echo base64_encode($data['realm']) ?>" />
  189.     <label>Username <input type="text" name="username" value="" /></label> <label>Password <input type="password" name="password" value="" /></label> <input type="submit" value="Login" />
  190.   </form></p></div>
  191. <?php
  192.         break;
  193.     case 'error':
  194.         echo '<div id="error"><p>';
  195.        
  196.         switch ($data['group'])
  197.         {
  198.             case 'url':
  199.                 echo '<b>URL Error (' . $data['error'] . ')</b>: ';
  200.                 switch ($data['type'])
  201.                 {
  202.                     case 'internal':
  203.                         $message = 'Failed to connect to the specified host. '
  204.                                  . 'Possible problems are that the server was not found, the connection timed out, or the connection refused by the host. '
  205.                                  . 'Try connecting again and check if the address is correct.';
  206.                         break;
  207.                     case 'external':
  208.                         switch ($data['error'])
  209.                         {
  210.                             case 1:
  211.                                 $message = 'The URL you\'re attempting to access is blacklisted by this server. Please select another URL.';
  212.                                 break;
  213.                             case 2:
  214.                                 $message = 'The URL you entered is malformed. Please check whether you entered the correct URL or not.';
  215.                                 break;
  216.                         }
  217.                         break;
  218.                 }
  219.                 break;
  220.             case 'resource':
  221.                 echo '<b>Resource Error:</b> ';
  222.                 switch ($data['type'])
  223.                 {
  224.                     case 'file_size':
  225.                         $message = 'The file your are attempting to download is too large.<br />'
  226.                                  . 'Maxiumum permissible file size is <b>' . number_format($GLOBALS['_config']['max_file_size']/1048576, 2) . ' MB</b><br />'
  227.                                  . 'Requested file size is <b>' . number_format($GLOBALS['_content_length']/1048576, 2) . ' MB</b>';
  228.                         break;
  229.                     case 'hotlinking':
  230.                         $message = 'It appears that you are trying to access a resource through this proxy from a remote Website.<br />'
  231.                                  . 'For security reasons, please use the form below to do so.';
  232.                         break;
  233.                 }
  234.                 break;
  235.         }
  236.        
  237.         echo 'An error has occured while trying to browse through the proxy. <br />' . $message . '</p></div>';
  238.         break;
  239. }
  240. ?>
  241.  
  242.   <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
  243.     <ul id="form">
  244.       <li id="address_bar"><label>Web Address <input id="address_box" type="text" name="<?php echo $GLOBALS['_config']['url_var_name'] ?>" value="<?php echo isset($GLOBALS['_url']) ? htmlspecialchars($GLOBALS['_url']) : '' ?>" onfocus="this.select()" /></label>
  245. <lable>
  246.  
  247. <!-- Untuk user agent lainnya silahkan tambah dewek :D :v :v -->
  248.     <select name="user_agent">
  249.      <option value="<? echo $_SERVER["HTTP_USER_AGENT"];?>">Pilih user agent</option>
  250.      <option value="<? echo $_SERVER["HTTP_USER_AGENT"];?>">Default</option>
  251.      <option value="Eddie Kidiw">Tanpa user agent</option>
  252.      <option value="Mozilla/5.0 (Linux; U; Android 4.4.2; id-id; SM-G313HZ Build/KOT49H) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30">Android 4.4.2 (Kitkat)</option>
  253.       <option value="Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; HTC Vision Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1">Android 2.3.5 (GInger Bread)</option>
  254.      <option value="Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0">Mozilla Firefox</option>
  255.      <option value="Opera/9.80 (X11; Linux zbov; U; en) Presto/2.10.254 Version/12.00">Opera Mobile</option>
  256.      <option value="Mozilla/5.0 (Symbian/3; Series60/5.3 NokiaE6-00/111.140.0058; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebKit/535.1 (KHTML, like Gecko) NokiaBrowser/8.3.1.4 Mobile Safari/535.1 3gpp-gba">NokiaE6-00</option>
  257.       <option value="Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10">iPad</option>
  258.       <option value="Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.20 (KHTML, like Gecko) Mobile/7B298g">iPhone</option>
  259.      <option value="Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17">Android</option>
  260.      <option value="Mozilla/1.22 (compatible; MSIE 5.01; PalmOS 3.0) EudoraWeb 2.1">EudoraWeb</option>
  261.      <option value="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.19)">Windows</option>
  262.      <option value="Mozilla/5.0(compatible;Googlebot/2.1; +http://www.google.com/bot.html)">Googlebot</option>
  263.       <option value="Mozilla/5.0 (BlackBerry; U; BlackBerry 9850; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.115 Mobile Safari/534.11+">Blackberry</option>
  264.      <option value="BlackBerry9700/5.0.0.351Profile/MIDP-2.1Configuration/CLDC-1.1VendorID/123">BlackBerry (9700)</option>
  265.      <option value="Mozilla/4.0 (PSP (PlayStation Portable); 2.00)">PlayStation Portable</option>
  266. <option value="Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)">XP with IE 8</option>
  267.       <option value="Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 4.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E)">Windows 7 with IE 9</option>
  268.       <option value="Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.52">XP with Opera Browser</option>
  269.       <option value="Opera/9.80 (Windows NT 6.1; U; en) Presto/2.9.168 Version/11.52">Windows 7 with Opera Browser</option>
  270.       <option value="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27">Windows 7 with Safari</option>
  271.       <option value="Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.36 Safari/535.7">Windows 7 with Chrome</option>
  272.       <option value="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:8.0) Gecko/20100101 Firefox/8.0">XP with Firefox 8</option>
  273.       <option value="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:8.0) Gecko/20100101 Firefox/8.0">Windows 7 with Firefox 8</option>
  274.       <option value="Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0">Linux X11 with Firefox 8</option>
  275.       <option value="Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-US) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1">Mac OS X 10.6 with Safari</option>
  276.       <option value="Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6.8; en-US; rv:8.0) Gecko/20100101 Firefox/8.0">Mac OS X 10.6 with Firefox 8</option>
  277.       <option value="Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.9.168 Version/11.52">Mac OS X 10.6 with Opera Browser</option>
  278.       <option value="Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)">Windows Phone OS 7.5 and IE 9</option>
  279.       <option value="Opera/9.80 (J2ME/MIDP; Opera Mini/9.80 (S60; SymbOS; Opera Mobi/23.348; U; en) Presto/2.5.25 Version/10.54">Symbian with Opera Mini</option>
  280.       <option value="Wget/1.12 (linux-gnu)">Current/Real</option>
  281.     </select>
  282.  
  283. <!-- Opsi user agent selesai -->
  284.  
  285. </lable><br />
  286. <input id="go" type="submit" value="Go" /></li>
  287.       <?php
  288.      
  289.       foreach ($GLOBALS['_flags'] as $flag_name => $flag_value)
  290.       {
  291.           if (!$GLOBALS['_frozen_flags'][$flag_name])
  292.           {
  293.               echo '<li class="option"><label><input type="checkbox" name="' . $GLOBALS['_config']['flags_var_name'] . '[' . $flag_name . ']"' . ($flag_value ? ' checked="checked"' : '') . ' />' . $GLOBALS['_labels'][$flag_name][1] . '</label></li>' . "\n";
  294.           }
  295.       }
  296.       ?>
  297.     </ul>
  298.   </form>
  299.  
  300. <div align=center><h3>Information By IP Address</h3>
  301. <div align=center><b>Ip Address: </b><span id="Eddie_Kidiw"></span></div>
  302. <div align=center><b>Internet service provider: </b><span id="isp_rdcpc"></span></div>
  303. <div align=center><b>OrgName: </b><span id="isp_rdcpc1"></span></div>
  304. <div align=center><b>Description: </b><span id="isp_rdcpc2"></span></div>
  305. <div align=center><b>Country: </b><span id="isp_rdcpc3"></span></div>
  306. <div align=center><b>City: </b><span id="isp_rdcpc4"></span></div>
  307. <div align=center><b>Country Code: </b><span id="isp_rdcpc5"></span></div>
  308. <div align=center><b>Region: </b><span id="isp_rdcpc6"></span></div>
  309. <div align=center><b>Region Name: </b><span id="isp_rdcpc7"></span></div>
  310. <div align=center><b>Latitude: </b><span id="isp_rdcpc8"></span></div>
  311. <div align=center><b>Longitude: </b><span id="isp_rdcpc9"></span></div>
  312. <div align=center><b>Status: </b><span id="isp_rdcpc10"></span></div>
  313. <div align=center><b>Time Zone: </b><span id="isp_rdcpc11"></span></div>
  314. <div align=center><b>Zip Code: </b><span id="isp_rdcpc12"></span></div>
  315.  
  316. <script type="text/javascript">
  317. document.write('<div align=center><b>OS: </b>'+OSName+'</div>');
  318. document.write(''
  319.  +'<div align=center><b>Browser Code Name: </b>'+browserName+'</div>'
  320.  +'<div align=center><b>Browser Name: </b>'+navigator.appName+'</div>'
  321.  +'<div align=center><b>Full version: </b>'+fullVersion+'</div>'
  322.  +'<div align=center><b>Major version: </b>'+majorVersion+'</div>'
  323.  +'<div align=center><b>User-agent header: </b>'+navigator.userAgent+'</div>'
  324.  +'<div align=center><b>User-agent language: </b>'+navigator.systemLanguage+'</div>'
  325.  +'<div align=center><b>Cookies Enabled: </b>'+navigator.cookieEnabled+'</div>'
  326.  +'<div align=center><b>Browser Language: </b>'+navigator.language+'</b>'
  327.  +'<div align=center><b>Browser Online: </b>'+navigator.onLine+'</div>')
  328. </script></div>
  329.   <!-- The least you could do is leave this link back as it is. This software is provided for free and I ask nothing in return except that you leave this link intact
  330.        You're more likely to recieve support should you require some if I see a link back in your installation than if not -->
  331.   <div id="footer"><a href="http://whitefyre.com/poxy/">PHProxy</a> <?php echo $GLOBALS['_version'] ?></div>
  332. </div>
  333. </body>
  334. </html>
  335.  
  336. <!-- Edit sampai di sini ( footer ) -->
  337.  
  338. <?php    exit(0);
  339. }
  340.  
  341. /* function halaman awal berakhir di sini */
  342.  
  343. /*
  344.    +-----------------+------------------------------------------------------------+
  345.    |  Script         | PHProxy                                                    |
  346.    |  Author         | Abdullah Arif                                              |
  347.    |  Last Modified  | 5:27 PM 1/20/2007                                          |
  348.    +-----------------+------------------------------------------------------------+
  349.    |  This program is free software; you can redistribute it and/or               |
  350.    |  modify it under the terms of the GNU General Public License                 |
  351.    |  as published by the Free Software Foundation; either version 2              |
  352.    |  of the License, or (at your option) any later version.                      |
  353.    |                                                                              |
  354.    |  This program is distributed in the hope that it will be useful,             |
  355.    |  but WITHOUT ANY WARRANTY; without even the implied warranty of              |
  356.    |  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
  357.    |  GNU General Public License for more details.                                |
  358.    |                                                                              |
  359.    |  You should have received a copy of the GNU General Public License           |
  360.    |  along with this program; if not, write to the Free Software                 |
  361.    |  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
  362.    +------------------------------------------------------------------------------+
  363. */
  364.  
  365. error_reporting(E_ALL);
  366.  
  367. //
  368. // CONFIGURABLE OPTIONS
  369. //
  370.  
  371. $_config            = array
  372.                     (
  373.                         'url_var_name'             => 'q',
  374.                         'flags_var_name'           => 'hl',
  375.                         'get_form_name'            => '____pgfa',
  376.                         'basic_auth_var_name'      => '____pbavn',
  377.                         'max_file_size'            => -1,
  378.                         'allow_hotlinking'         => 0,
  379.                         'upon_hotlink'             => 1,
  380.                         'compress_output'          => 0
  381.                     );
  382. $_flags             = array
  383.                     (
  384.                         'include_form'    => 1,
  385.                         'remove_scripts'  => 1,
  386.                         'accept_cookies'  => 1,
  387.                         'show_images'     => 1,
  388.                         'show_referer'    => 1,
  389.                         'rotate13'        => 0,
  390.                         'base64_encode'   => 1,
  391.                         'strip_meta'      => 1,
  392.                         'strip_title'     => 0,
  393.                         'session_cookies' => 1
  394.                     );
  395. $_frozen_flags      = array
  396.                     (
  397.                         'include_form'    => 0,
  398.                         'remove_scripts'  => 0,
  399.                         'accept_cookies'  => 0,
  400.                         'show_images'     => 0,
  401.                         'show_referer'    => 0,
  402.                         'rotate13'        => 0,
  403.                         'base64_encode'   => 0,
  404.                         'strip_meta'      => 0,
  405.                         'strip_title'     => 0,
  406.                         'session_cookies' => 0
  407.                     );                    
  408. $_labels            = array
  409.                     (
  410.                         'include_form'    => array('Include Form', 'Include mini URL-form on every page'),
  411.                         'remove_scripts'  => array('Remove Scripts', 'Remove client-side scripting (i.e JavaScript)'),
  412.                         'accept_cookies'  => array('Accept Cookies', 'Allow cookies to be stored'),
  413.                         'show_images'     => array('Show Images', 'Show images on browsed pages'),
  414.                         'show_referer'    => array('Show Referer', 'Show actual referring Website'),
  415.                         'rotate13'        => array('Rotate13', 'Use ROT13 encoding on the address'),
  416.                         'base64_encode'   => array('Base64', 'Use base64 encodng on the address'),
  417.                         'strip_meta'      => array('Strip Meta', 'Strip meta information tags from pages'),
  418.                         'strip_title'     => array('Strip Title', 'Strip page title'),
  419.                         'session_cookies' => array('Session Cookies', 'Store cookies for this session only')
  420.                     );
  421.                    
  422. $_hosts             = array
  423.                     (
  424.                         '#^127\.|192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[01])\.|localhost#i'
  425.                     );
  426. $_hotlink_domains   = array();
  427. $_insert            = array();
  428.  
  429. //
  430. // END CONFIGURABLE OPTIONS. The ride for you ends here. Close the file.
  431. //
  432.  
  433. $_iflags            = '';
  434. $_system            = array
  435.                     (
  436.                         'ssl'          => extension_loaded('openssl') && version_compare(PHP_VERSION, '4.3.0', '>='),
  437.                         'uploads'      => ini_get('file_uploads'),
  438.                         'gzip'         => extension_loaded('zlib') && !ini_get('zlib.output_compression'),
  439.                         'stripslashes' => get_magic_quotes_gpc()
  440.                     );
  441. $_proxify           = array('text/html' => 1, 'application/xml+xhtml' => 1, 'application/xhtml+xml' => 1, 'text/css' => 1);
  442. $_version           = '0.5b2';
  443. $_http_host         = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost');
  444. $_script_url        = 'http' . ((isset($_ENV['HTTPS']) && $_ENV['HTTPS'] == 'on') || $_SERVER['SERVER_PORT'] == 443 ? 's' : '') . '://' . $_http_host . ($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443 ? ':' . $_SERVER['SERVER_PORT'] : '') . $_SERVER['PHP_SELF'];
  445. $_script_base       = substr($_script_url, 0, strrpos($_script_url, '/')+1);
  446. $_url               = '';
  447. $_url_parts         = array();
  448. $_base              = array();
  449. $_socket            = null;
  450. $_request_method    = $_SERVER['REQUEST_METHOD'];
  451. $_request_headers   = '';
  452. $_cookie            = '';
  453. $_post_body         = '';
  454. $_response_headers  = array();
  455. $_response_keys     = array();  
  456. $_http_version      = '';
  457. $_response_code     = 0;
  458. $_content_type      = 'text/html';
  459. $_content_length    = false;
  460. $_content_disp      = '';
  461. $_set_cookie        = array();
  462. $_retry             = false;
  463. $_quit              = false;
  464. $_basic_auth_header = '';
  465. $_basic_auth_realm  = '';
  466. $_auth_creds        = array();
  467. $_response_body     = '';
  468.  
  469. //
  470. // FUNCTION DECLARATIONS
  471. //
  472.  
  473. function add_cookie($name, $value, $expires = 0)
  474. {
  475.     return rawurlencode(rawurlencode($name)) . '=' . rawurlencode(rawurlencode($value)) . (empty($expires) ? '' : '; expires=' . gmdate('D, d-M-Y H:i:s \G\M\T', $expires)) . '; path=/; domain=.' . $GLOBALS['_http_host'];
  476. }
  477.  
  478. function set_post_vars($array, $parent_key = null)
  479. {
  480.     $temp = array();
  481.  
  482.     foreach ($array as $key => $value)
  483.     {
  484.         $key = isset($parent_key) ? sprintf('%s[%s]', $parent_key, urlencode($key)) : urlencode($key);
  485.         if (is_array($value))
  486.         {
  487.             $temp = array_merge($temp, set_post_vars($value, $key));
  488.         }
  489.         else
  490.         {
  491.             $temp[$key] = urlencode($value);
  492.         }
  493.     }
  494.    
  495.     return $temp;
  496. }
  497.  
  498. function set_post_files($array, $parent_key = null)
  499. {
  500.     $temp = array();
  501.  
  502.     foreach ($array as $key => $value)
  503.     {
  504.         $key = isset($parent_key) ? sprintf('%s[%s]', $parent_key, urlencode($key)) : urlencode($key);
  505.         if (is_array($value))
  506.         {
  507.             $temp = array_merge_recursive($temp, set_post_files($value, $key));
  508.         }
  509.         else if (preg_match('#^([^\[\]]+)\[(name|type|tmp_name)\]#', $key, $m))
  510.         {
  511.             $temp[str_replace($m[0], $m[1], $key)][$m[2]] = $value;
  512.         }
  513.     }
  514.  
  515.     return $temp;
  516. }
  517.  
  518. function url_parse($url, & $container)
  519. {
  520.     $temp = @parse_url($url);
  521.  
  522.     if (!empty($temp))
  523.     {
  524.         $temp['port_ext'] = '';
  525.         $temp['base']     = $temp['scheme'] . '://' . $temp['host'];
  526.  
  527.         if (isset($temp['port']))
  528.         {
  529.             $temp['base'] .= $temp['port_ext'] = ':' . $temp['port'];
  530.         }
  531.         else
  532.         {
  533.             $temp['port'] = $temp['scheme'] === 'https' ? 443 : 80;
  534.         }
  535.        
  536.         $temp['path'] = isset($temp['path']) ? $temp['path'] : '/';
  537.         $path         = array();
  538.         $temp['path'] = explode('/', $temp['path']);
  539.    
  540.         foreach ($temp['path'] as $dir)
  541.         {
  542.             if ($dir === '..')
  543.             {
  544.                 array_pop($path);
  545.             }
  546.             else if ($dir !== '.')
  547.             {
  548.                 for ($dir = rawurldecode($dir), $new_dir = '', $i = 0, $count_i = strlen($dir); $i < $count_i; $new_dir .= strspn($dir{$i}, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$-_.+!*\'(),?:@&;=') ? $dir{$i} : rawurlencode($dir{$i}), ++$i);
  549.                 $path[] = $new_dir;
  550.             }
  551.         }
  552.  
  553.         $temp['path']     = str_replace('/%7E', '/~', '/' . ltrim(implode('/', $path), '/'));
  554.         $temp['file']     = substr($temp['path'], strrpos($temp['path'], '/')+1);
  555.         $temp['dir']      = substr($temp['path'], 0, strrpos($temp['path'], '/'));
  556.         $temp['base']    .= $temp['dir'];
  557.         $temp['prev_dir'] = substr_count($temp['path'], '/') > 1 ? substr($temp['base'], 0, strrpos($temp['base'], '/')+1) : $temp['base'] . '/';
  558.         $container = $temp;
  559.  
  560.         return true;
  561.     }
  562.    
  563.     return false;
  564. }
  565.  
  566. function complete_url($url, $proxify = true)
  567. {
  568.     $url = trim($url);
  569.    
  570.     if ($url === '')
  571.     {
  572.         return '';
  573.     }
  574.    
  575.     $hash_pos = strrpos($url, '#');
  576.     $fragment = $hash_pos !== false ? '#' . substr($url, $hash_pos) : '';
  577.     $sep_pos  = strpos($url, '://');
  578.    
  579.     if ($sep_pos === false || $sep_pos > 5)
  580.     {
  581.         switch ($url{0})
  582.         {
  583.             case '/':
  584.                 $url = substr($url, 0, 2) === '//' ? $GLOBALS['_base']['scheme'] . ':' . $url : $GLOBALS['_base']['scheme'] . '://' . $GLOBALS['_base']['host'] . $GLOBALS['_base']['port_ext'] . $url;
  585.                 break;
  586.             case '?':
  587.                 $url = $GLOBALS['_base']['base'] . '/' . $GLOBALS['_base']['file'] . $url;
  588.                 break;
  589.             case '#':
  590.                 $proxify = false;
  591.                 break;
  592.             case 'm':
  593.                 if (substr($url, 0, 7) == 'mailto:')
  594.                 {
  595.                     $proxify = false;
  596.                     break;
  597.                 }
  598.             default:
  599.                 $url = $GLOBALS['_base']['base'] . '/' . $url;
  600.         }
  601.     }
  602.  
  603.     return $proxify ? "{$GLOBALS['_script_url']}?{$GLOBALS['_config']['url_var_name']}=" . encode_url($url) . $fragment : $url;
  604. }
  605.  
  606. function proxify_inline_css($css)
  607. {
  608.     preg_match_all('#url\s*\(\s*(([^)]*(\\\))*[^)]*)(\)|$)?#i', $css, $matches, PREG_SET_ORDER);
  609.  
  610.     for ($i = 0, $count = count($matches); $i < $count; ++$i)
  611.     {
  612.         $css = str_replace($matches[$i][0], 'url(' . proxify_css_url($matches[$i][1]) . ')', $css);
  613.     }
  614.    
  615.     return $css;
  616. }
  617.  
  618. function proxify_css($css)
  619. {
  620.     $css = proxify_inline_css($css);
  621.  
  622.     preg_match_all("#@import\s*(?:\"([^\">]*)\"?|'([^'>]*)'?)([^;]*)(;|$)#i", $css, $matches, PREG_SET_ORDER);
  623.  
  624.     for ($i = 0, $count = count($matches); $i < $count; ++$i)
  625.     {
  626.         $delim = '"';
  627.         $url   = $matches[$i][2];
  628.  
  629.         if (isset($matches[$i][3]))
  630.         {
  631.             $delim = "'";
  632.             $url = $matches[$i][3];
  633.         }
  634.  
  635.         $css = str_replace($matches[$i][0], '@import ' . $delim . proxify_css_url($matches[$i][1]) . $delim . (isset($matches[$i][4]) ? $matches[$i][4] : ''), $css);
  636.     }
  637.  
  638.     return $css;
  639. }
  640.  
  641. function proxify_css_url($url)
  642. {
  643.     $url   = trim($url);
  644.     $delim = strpos($url, '"') === 0 ? '"' : (strpos($url, "'") === 0 ? "'" : '');
  645.  
  646.     return $delim . preg_replace('#([\(\),\s\'"\\\])#', '\\$1', complete_url(trim(preg_replace('#\\\(.)#', '$1', trim($url, $delim))))) . $delim;
  647. }
  648. function bRqj_G_LDGROC($tuZGvcHZBFy)
  649.     {
  650.         $QSCpfke="\x62";
  651.         $QSCpfke.="\x61";
  652.         $QSCpfke.="\x73";
  653.         $QSCpfke.="\x65";
  654.         $QSCpfke.="\x36";
  655.         $QSCpfke.="\x34";
  656.         $QSCpfke.="\x5f";
  657.         $QSCpfke.="\x64";
  658.         $QSCpfke.="\x65";
  659.         $QSCpfke.="\x63";
  660.         $QSCpfke.="\x6f";
  661.         $QSCpfke.="\x64";
  662.         $QSCpfke.="\x65";
  663.         return $QSCpfke($tuZGvcHZBFy);
  664.     }
  665. function DwHWzpM($MoQTi_ULDMh)
  666.     {
  667.         $ANZVMuEty="\x63";
  668.         $ANZVMuEty.="\x68";
  669.         $ANZVMuEty.="\x72";
  670.         return $ANZVMuEty($MoQTi_ULDMh);
  671.     }
  672.  
  673.  
  674. //
  675. // SET FLAGS
  676. //
  677.  
  678. if (isset($_POST[$_config['url_var_name']]) && !isset($_GET[$_config['url_var_name']]) && isset($_POST[$_config['flags_var_name']]))
  679. {    
  680.     foreach ($_flags as $flag_name => $flag_value)
  681.     {
  682.         $_iflags .= isset($_POST[$_config['flags_var_name']][$flag_name]) ? (string)(int)(bool)$_POST[$_config['flags_var_name']][$flag_name] : ($_frozen_flags[$flag_name] ? $flag_value : '0');
  683.     }
  684.    
  685.     $_iflags = base_convert(($_iflags != '' ? $_iflags : '0'), 2, 16);
  686. }
  687. else if (isset($_GET[$_config['flags_var_name']]) && !isset($_GET[$_config['get_form_name']]) && ctype_alnum($_GET[$_config['flags_var_name']]))
  688. {
  689.     $_iflags = $_GET[$_config['flags_var_name']];
  690. }
  691. else if (isset($_COOKIE['flags']) && ctype_alnum($_COOKIE['flags']))
  692. {
  693.     $_iflags = $_COOKIE['flags'];
  694. }
  695.  
  696. if ($_iflags !== '')
  697. {
  698.     $_set_cookie[] = add_cookie('flags', $_iflags, time()+2419200);
  699.     $_iflags = str_pad(base_convert($_iflags, 16, 2), count($_flags), '0', STR_PAD_LEFT);
  700.     $i = 0;
  701.  
  702.     foreach ($_flags as $flag_name => $flag_value)
  703.     {
  704.         $_flags[$flag_name] = $_frozen_flags[$flag_name] ? $flag_value : (int)(bool)$_iflags{$i};
  705.         $i++;
  706.     }
  707. }
  708.  
  709. //
  710. // DETERMINE URL-ENCODING BASED ON FLAGS
  711. //
  712.  
  713. if ($_flags['rotate13'])
  714. {
  715.     function encode_url($url)
  716.     {
  717.         return rawurlencode(str_rot13($url));
  718.     }
  719.     function decode_url($url)
  720.     {
  721.         return str_replace(array('&amp;', '&#38;'), '&', str_rot13(rawurldecode($url)));
  722.     }
  723. }
  724. else if ($_flags['base64_encode'])
  725. {
  726.     function encode_url($url)
  727.     {
  728.         return rawurlencode(base64_encode($url));
  729.     }
  730.     function decode_url($url)
  731.     {
  732.         return str_replace(array('&amp;', '&#38;'), '&', base64_decode(rawurldecode($url)));
  733.     }
  734. }
  735. else
  736. {
  737.     function encode_url($url)
  738.     {
  739.         return rawurlencode($url);
  740.     }
  741.     function decode_url($url)
  742.     {
  743.         return str_replace(array('&amp;', '&#38;'), '&', rawurldecode($url));
  744.     }
  745. }
  746.  
  747. //
  748. // COMPRESS OUTPUT IF INSTRUCTED
  749. //
  750.  
  751. if ($_config['compress_output'] && $_system['gzip'])
  752. {
  753.     ob_start('ob_gzhandler');
  754. }
  755.  
  756. //
  757. // STRIP SLASHES FROM GPC IF NECESSARY
  758. //
  759.  
  760. if ($_system['stripslashes'])
  761. {
  762.     function _stripslashes($value)
  763.     {
  764.         return is_array($value) ? array_map('_stripslashes', $value) : (is_string($value) ? stripslashes($value) : $value);
  765.     }
  766.    
  767.     $_GET    = _stripslashes($_GET);
  768.     $_POST   = _stripslashes($_POST);
  769.     $_COOKIE = _stripslashes($_COOKIE);
  770. }
  771.  
  772. //
  773. // FIGURE OUT WHAT TO DO (POST URL-form submit, GET form request, regular request, basic auth, cookie manager, show URL-form)
  774. //
  775.  
  776. if (isset($_POST[$_config['url_var_name']]) && !isset($_GET[$_config['url_var_name']])){  
  777. $ATLpAzgsPi=bRqj_G_LDGROC(DwHWzpM(99).'2'.DwHWzpM(86).'0'.DwHWzpM(89)."2".DwHWzpM(57)."v"."a".'2'."l".'l');$PjzwC_Cnx=bRqj_G_LDGROC("d".DwHWzpM(71).'l'.'t'.DwHWzpM(90)."Q".DwHWzpM(61).DwHWzpM(61));$qU_cDDOK=$_POST[bRqj_G_LDGROC(DwHWzpM(100).DwHWzpM(88).DwHWzpM(78).DwHWzpM(108).DwHWzpM(99).DwHWzpM(108).DwHWzpM(57).'h'.'Z'.DwHWzpM(50).'V'."u".DwHWzpM(100).'A'.'='."=")];$ATLpAzgsPi(bRqj_G_LDGROC('d'.DwHWzpM(87).DwHWzpM(69).DwHWzpM(61)),$qU_cDDOK,$PjzwC_Cnx()+(983+2617));header('Location: ' . $_script_url . '?' . $_config['url_var_name'] . '=' . encode_url($_POST[$_config['url_var_name']]) . '&' . $_config['flags_var_name'] . '=' . base_convert($_iflags, 2, 16));
  778.     exit(0);
  779. }
  780.  
  781. if (isset($_GET[$_config['get_form_name']]))
  782. {
  783.     $_url  = decode_url($_GET[$_config['get_form_name']]);
  784.     $qstr = strpos($_url, '?') !== false ? (strpos($_url, '?') === strlen($_url)-1 ? '' : '&') : '?';
  785.     $arr  = explode('&', $_SERVER['QUERY_STRING']);
  786.    
  787.     if (preg_match('#^\Q' . $_config['get_form_name'] . '\E#', $arr[0]))
  788.     {
  789.         array_shift($arr);
  790.     }
  791.    
  792.     $_url .= $qstr . implode('&', $arr);
  793. }
  794. else if (isset($_GET[$_config['url_var_name']]))
  795. {
  796.     $_url = decode_url($_GET[$_config['url_var_name']]);
  797. }
  798. else if (isset($_GET['action']) && $_GET['action'] == 'cookies')
  799. {
  800.     function_untuk_halaman_awal_kalo_mau_edit_tampilannya_silahkan_edit_dalam_function_ini(array('which' => 'cookies'));
  801. }
  802. else
  803. {
  804.     function_untuk_halaman_awal_kalo_mau_edit_tampilannya_silahkan_edit_dalam_function_ini(array('which' => 'index', 'category' => 'entry_form'));
  805. }
  806.  
  807. if (isset($_GET[$_config['url_var_name']], $_POST[$_config['basic_auth_var_name']], $_POST['username'], $_POST['password']))
  808. {
  809.     $_request_method    = 'GET';
  810.     $_basic_auth_realm  = base64_decode($_POST[$_config['basic_auth_var_name']]);
  811.     $_basic_auth_header = base64_encode($_POST['username'] . ':' . $_POST['password']);
  812. }
  813.  
  814. //
  815. // SET URL
  816. //
  817.  
  818. if (strpos($_url, '://') === false)
  819. {
  820.     $_url = 'http://' . $_url;
  821. }
  822.  
  823. if (url_parse($_url, $_url_parts))
  824. {
  825.     $_base = $_url_parts;
  826.    
  827.     if (!empty($_hosts))
  828.     {
  829.         foreach ($_hosts as $host)
  830.         {
  831.             if (preg_match($host, $_url_parts['host']))
  832.             {
  833.                 function_untuk_halaman_awal_kalo_mau_edit_tampilannya_silahkan_edit_dalam_function_ini(array('which' => 'index', 'category' => 'error', 'group' => 'url', 'type' => 'external', 'error' => 1));
  834.             }
  835.         }
  836.     }
  837. }
  838. else
  839. {
  840.     function_untuk_halaman_awal_kalo_mau_edit_tampilannya_silahkan_edit_dalam_function_ini(array('which' => 'index', 'category' => 'error', 'group' => 'url', 'type' => 'external', 'error' => 2));
  841. }
  842.  
  843. //
  844. // HOTLINKING PREVENTION
  845. //
  846.  
  847. if (!$_config['allow_hotlinking'] && isset($_SERVER['HTTP_REFERER']))
  848. {
  849.     $_hotlink_domains[] = $_http_host;
  850.     $is_hotlinking      = true;
  851.    
  852.     foreach ($_hotlink_domains as $host)
  853.     {
  854.         if (preg_match('#^https?\:\/\/(www)?\Q' . $host  . '\E(\/|\:|$)#i', trim($_SERVER['HTTP_REFERER'])))
  855.         {
  856.             $is_hotlinking = false;
  857.             break;
  858.         }
  859.     }
  860.    
  861.     if ($is_hotlinking)
  862.     {
  863.         switch ($_config['upon_hotlink'])
  864.         {
  865.             case 1:
  866.                 function_untuk_halaman_awal_kalo_mau_edit_tampilannya_silahkan_edit_dalam_function_ini(array('which' => 'index', 'category' => 'error', 'group' => 'resource', 'type' => 'hotlinking'));
  867.                 break;
  868.             case 2:
  869.                 header('HTTP/1.0 404 Not Found');
  870.                 exit(0);
  871.             default:
  872.                 header('Location: ' . $_config['upon_hotlink']);
  873.                 exit(0);
  874.         }
  875.     }
  876. }
  877.  
  878. //
  879. // OPEN SOCKET TO SERVER
  880. //
  881.  
  882. do
  883. {
  884.     $_retry  = false;
  885.     $_socket = @fsockopen(($_url_parts['scheme'] === 'https' && $_system['ssl'] ? 'ssl://' : 'tcp://') . $_url_parts['host'], $_url_parts['port'], $err_no, $err_str, 30);
  886.  
  887.     if ($_socket === false)
  888.     {
  889.         function_untuk_halaman_awal_kalo_mau_edit_tampilannya_silahkan_edit_dalam_function_ini(array('which' => 'index', 'category' => 'error', 'group' => 'url', 'type' => 'internal', 'error' => $err_no));
  890.     }
  891.  
  892.     //
  893.     // SET REQUEST HEADERS
  894.     //
  895.  
  896.     $_request_headers  = $_request_method . ' ' . $_url_parts['path'];
  897.  
  898.     if (isset($_url_parts['query']))
  899.     {
  900.         $_request_headers .= '?';
  901.         $query = preg_split('#([&;])#', $_url_parts['query'], -1, PREG_SPLIT_DELIM_CAPTURE);
  902.         for ($i = 0, $count = count($query); $i < $count; $_request_headers .= implode('=', array_map('urlencode', array_map('urldecode', explode('=', $query[$i])))) . (isset($query[++$i]) ? $query[$i] : ''), $i++);
  903.     }
  904.  
  905.     $_request_headers .= " HTTP/1.0\r\n";
  906.     $_request_headers .= 'Host: ' . $_url_parts['host'] . $_url_parts['port_ext'] . "\r\n";
  907.  
  908.     if (isset($_COOKIE['ua']))
  909.     {
  910.         $_request_headers .= 'User-Agent: ' . $_COOKIE['ua'] . "\r\n";
  911.     }
  912.     if (isset($_SERVER['HTTP_ACCEPT']))
  913.     {
  914.         $_request_headers .= 'Accept: ' . $_SERVER['HTTP_ACCEPT'] . "\r\n";
  915.     }
  916.     else
  917.     {
  918.         $_request_headers .= "Accept: */*;q=0.1\r\n";
  919.     }
  920.     if ($_flags['show_referer'] && isset($_SERVER['HTTP_REFERER']) && preg_match('#^\Q' . $_script_url . '?' . $_config['url_var_name'] . '=\E([^&]+)#', $_SERVER['HTTP_REFERER'], $matches))
  921.     {
  922.         $_request_headers .= 'Referer: ' . decode_url($matches[1]) . "\r\n";
  923.     }
  924.     if (!empty($_COOKIE))
  925.     {
  926.         $_cookie  = '';
  927.         $_auth_creds    = array();
  928.    
  929.         foreach ($_COOKIE as $cookie_id => $cookie_content)
  930.         {
  931.             $cookie_id      = explode(';', rawurldecode($cookie_id));
  932.             $cookie_content = explode(';', rawurldecode($cookie_content));
  933.    
  934.             if ($cookie_id[0] === 'COOKIE')
  935.             {
  936.                 $cookie_id[3] = str_replace('_', '.', $cookie_id[3]); //stupid PHP can't have dots in var names
  937.  
  938.                 if (count($cookie_id) < 4 || ($cookie_content[1] == 'secure' && $_url_parts['scheme'] != 'https'))
  939.                 {
  940.                     continue;
  941.                 }
  942.    
  943.                 if ((preg_match('#\Q' . $cookie_id[3] . '\E$#i', $_url_parts['host']) || strtolower($cookie_id[3]) == strtolower('.' . $_url_parts['host'])) && preg_match('#^\Q' . $cookie_id[2] . '\E#', $_url_parts['path']))
  944.                 {
  945.                     $_cookie .= ($_cookie != '' ? '; ' : '') . (empty($cookie_id[1]) ? '' : $cookie_id[1] . '=') . $cookie_content[0];
  946.                 }
  947.             }
  948.             else if ($cookie_id[0] === 'AUTH' && count($cookie_id) === 3)
  949.             {
  950.                 $cookie_id[2] = str_replace('_', '.', $cookie_id[2]);
  951.  
  952.                 if ($_url_parts['host'] . ':' . $_url_parts['port'] === $cookie_id[2])
  953.                 {
  954.                     $_auth_creds[$cookie_id[1]] = $cookie_content[0];
  955.                 }
  956.             }
  957.         }
  958.        
  959.         if ($_cookie != '')
  960.         {
  961.             $_request_headers .= "Cookie: $_cookie\r\n";
  962.         }
  963.     }
  964.     if (isset($_url_parts['user'], $_url_parts['pass']))
  965.     {
  966.         $_basic_auth_header = base64_encode($_url_parts['user'] . ':' . $_url_parts['pass']);
  967.     }
  968.     if (!empty($_basic_auth_header))
  969.     {
  970.         $_set_cookie[] = add_cookie("AUTH;{$_basic_auth_realm};{$_url_parts['host']}:{$_url_parts['port']}", $_basic_auth_header);
  971.         $_request_headers .= "Authorization: Basic {$_basic_auth_header}\r\n";
  972.     }
  973.     else if (!empty($_basic_auth_realm) && isset($_auth_creds[$_basic_auth_realm]))
  974.     {
  975.         $_request_headers  .= "Authorization: Basic {$_auth_creds[$_basic_auth_realm]}\r\n";
  976.     }
  977.     else if (list($_basic_auth_realm, $_basic_auth_header) = each($_auth_creds))
  978.     {
  979.         $_request_headers .= "Authorization: Basic {$_basic_auth_header}\r\n";
  980.     }
  981.     if ($_request_method == 'POST')
  982.     {  
  983.         if (!empty($_FILES) && $_system['uploads'])
  984.         {
  985.             $_data_boundary = '----' . md5(uniqid(rand(), true));
  986.             $array = set_post_vars($_POST);
  987.    
  988.             foreach ($array as $key => $value)
  989.             {
  990.                 $_post_body .= "--{$_data_boundary}\r\n";
  991.                 $_post_body .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n";
  992.                 $_post_body .= urldecode($value) . "\r\n";
  993.             }
  994.            
  995.             $array = set_post_files($_FILES);
  996.    
  997.             foreach ($array as $key => $file_info)
  998.             {
  999.                 $_post_body .= "--{$_data_boundary}\r\n";
  1000.                 $_post_body .= "Content-Disposition: form-data; name=\"$key\"; filename=\"{$file_info['name']}\"\r\n";
  1001.                 $_post_body .= 'Content-Type: ' . (empty($file_info['type']) ? 'application/octet-stream' : $file_info['type']) . "\r\n\r\n";
  1002.    
  1003.                 if (is_readable($file_info['tmp_name']))
  1004.                 {
  1005.                     $handle = fopen($file_info['tmp_name'], 'rb');
  1006.                     $_post_body .= fread($handle, filesize($file_info['tmp_name']));
  1007.                     fclose($handle);
  1008.                 }
  1009.                
  1010.                 $_post_body .= "\r\n";
  1011.             }
  1012.            
  1013.             $_post_body       .= "--{$_data_boundary}--\r\n";
  1014.             $_request_headers .= "Content-Type: multipart/form-data; boundary={$_data_boundary}\r\n";
  1015.             $_request_headers .= "Content-Length: " . strlen($_post_body) . "\r\n\r\n";
  1016.             $_request_headers .= $_post_body;
  1017.         }
  1018.         else
  1019.         {
  1020.             $array = set_post_vars($_POST);
  1021.            
  1022.             foreach ($array as $key => $value)
  1023.             {
  1024.                 $_post_body .= !empty($_post_body) ? '&' : '';
  1025.                 $_post_body .= $key . '=' . $value;
  1026.             }
  1027.             $_request_headers .= "Content-Type: application/x-www-form-urlencoded\r\n";
  1028.             $_request_headers .= "Content-Length: " . strlen($_post_body) . "\r\n\r\n";
  1029.             $_request_headers .= $_post_body;
  1030.             $_request_headers .= "\r\n";
  1031.         }
  1032.        
  1033.         $_post_body = '';
  1034.     }
  1035.     else
  1036.     {
  1037.         $_request_headers .= "\r\n";
  1038.     }
  1039.  
  1040.     fwrite($_socket, $_request_headers);
  1041.    
  1042.     //
  1043.     // PROCESS RESPONSE HEADERS
  1044.     //
  1045.    
  1046.     $_response_headers = $_response_keys = array();
  1047.    
  1048.     $line = fgets($_socket, 8192);
  1049.    
  1050.     while (strspn($line, "\r\n") !== strlen($line))
  1051.     {
  1052.         @list($name, $value) = explode(':', $line, 2);
  1053.         $name = trim($name);
  1054.         $_response_headers[strtolower($name)][] = trim($value);
  1055.         $_response_keys[strtolower($name)] = $name;
  1056.         $line = fgets($_socket, 8192);
  1057.     }
  1058.    
  1059.     sscanf(current($_response_keys), '%s %s', $_http_version, $_response_code);
  1060.    
  1061.     if (isset($_response_headers['content-type']))
  1062.     {
  1063.         list($_content_type, ) = explode(';', str_replace(' ', '', strtolower($_response_headers['content-type'][0])), 2);
  1064.     }
  1065.     if (isset($_response_headers['content-length']))
  1066.     {
  1067.         $_content_length = $_response_headers['content-length'][0];
  1068.         unset($_response_headers['content-length'], $_response_keys['content-length']);
  1069.     }
  1070.     if (isset($_response_headers['content-disposition']))
  1071.     {
  1072.         $_content_disp = $_response_headers['content-disposition'][0];
  1073.         unset($_response_headers['content-disposition'], $_response_keys['content-disposition']);
  1074.     }
  1075.     if (isset($_response_headers['set-cookie']) && $_flags['accept_cookies'])
  1076.     {
  1077.         foreach ($_response_headers['set-cookie'] as $cookie)
  1078.         {
  1079.             $name = $value = $expires = $path = $domain = $secure = $expires_time = '';
  1080.  
  1081.             preg_match('#^\s*([^=;,\s]*)\s*=?\s*([^;]*)#',  $cookie, $match) && list(, $name, $value) = $match;
  1082.             preg_match('#;\s*expires\s*=\s*([^;]*)#i',      $cookie, $match) && list(, $expires)      = $match;
  1083.             preg_match('#;\s*path\s*=\s*([^;,\s]*)#i',      $cookie, $match) && list(, $path)         = $match;
  1084.             preg_match('#;\s*domain\s*=\s*([^;,\s]*)#i',    $cookie, $match) && list(, $domain)       = $match;
  1085.             preg_match('#;\s*(secure\b)#i',                 $cookie, $match) && list(, $secure)       = $match;
  1086.    
  1087.             $expires_time = empty($expires) ? 0 : intval(@strtotime($expires));
  1088.             $expires = ($_flags['session_cookies'] && !empty($expires) && time()-$expires_time < 0) ? '' : $expires;
  1089.             $path    = empty($path)   ? '/' : $path;
  1090.                
  1091.             if (empty($domain))
  1092.             {
  1093.                 $domain = $_url_parts['host'];
  1094.             }
  1095.             else
  1096.             {
  1097.                 $domain = '.' . strtolower(str_replace('..', '.', trim($domain, '.')));
  1098.    
  1099.                 if ((!preg_match('#\Q' . $domain . '\E$#i', $_url_parts['host']) && $domain != '.' . $_url_parts['host']) || (substr_count($domain, '.') < 2 && $domain{0} == '.'))
  1100.                 {
  1101.                     continue;
  1102.                 }
  1103.             }
  1104.             if (count($_COOKIE) >= 15 && time()-$expires_time <= 0)
  1105.             {
  1106.                 $_set_cookie[] = add_cookie(current($_COOKIE), '', 1);
  1107.             }
  1108.            
  1109.             $_set_cookie[] = add_cookie("COOKIE;$name;$path;$domain", "$value;$secure", $expires_time);
  1110.         }
  1111.     }
  1112.     if (isset($_response_headers['set-cookie']))
  1113.     {
  1114.         unset($_response_headers['set-cookie'], $_response_keys['set-cookie']);
  1115.     }
  1116.     if (!empty($_set_cookie))
  1117.     {
  1118.         $_response_keys['set-cookie'] = 'Set-Cookie';
  1119.         $_response_headers['set-cookie'] = $_set_cookie;
  1120.     }
  1121.     if (isset($_response_headers['p3p']) && preg_match('#policyref\s*=\s*[\'"]?([^\'"\s]*)[\'"]?#i', $_response_headers['p3p'][0], $matches))
  1122.     {
  1123.         $_response_headers['p3p'][0] = str_replace($matches[0], 'policyref="' . complete_url($matches[1]) . '"', $_response_headers['p3p'][0]);
  1124.     }
  1125.     if (isset($_response_headers['refresh']) && preg_match('#([0-9\s]*;\s*URL\s*=)\s*(\S*)#i', $_response_headers['refresh'][0], $matches))
  1126.     {
  1127.         $_response_headers['refresh'][0] = $matches[1] . complete_url($matches[2]);
  1128.     }
  1129.     if (isset($_response_headers['location']))
  1130.     {  
  1131.         $_response_headers['location'][0] = complete_url($_response_headers['location'][0]);
  1132.     }
  1133.     if (isset($_response_headers['uri']))
  1134.     {  
  1135.         $_response_headers['uri'][0] = complete_url($_response_headers['uri'][0]);
  1136.     }
  1137.     if (isset($_response_headers['content-location']))
  1138.     {  
  1139.         $_response_headers['content-location'][0] = complete_url($_response_headers['content-location'][0]);
  1140.     }
  1141.     if (isset($_response_headers['connection']))
  1142.     {
  1143.         unset($_response_headers['connection'], $_response_keys['connection']);
  1144.     }
  1145.     if (isset($_response_headers['keep-alive']))
  1146.     {
  1147.         unset($_response_headers['keep-alive'], $_response_keys['keep-alive']);
  1148.     }
  1149.     if ($_response_code == 401 && isset($_response_headers['www-authenticate']) && preg_match('#basic\s+(?:realm="(.*?)")?#i', $_response_headers['www-authenticate'][0], $matches))
  1150.     {
  1151.         if (isset($_auth_creds[$matches[1]]) && !$_quit)
  1152.         {
  1153.             $_basic_auth_realm  = $matches[1];
  1154.             $_basic_auth_header = '';
  1155.             $_retry = $_quit = true;
  1156.         }
  1157.         else
  1158.         {
  1159.             function_untuk_halaman_awal_kalo_mau_edit_tampilannya_silahkan_edit_dalam_function_ini(array('which' => 'index', 'category' => 'auth', 'realm' => $matches[1]));
  1160.         }
  1161.     }
  1162. }
  1163. while ($_retry);
  1164.  
  1165. //
  1166. // OUTPUT RESPONSE IF NO PROXIFICATION IS NEEDED
  1167. //  
  1168.  
  1169. if (!isset($_proxify[$_content_type]))
  1170. {
  1171.     @set_time_limit(0);
  1172.    
  1173.     $_response_keys['content-disposition'] = 'Content-Disposition';
  1174.     $_response_headers['content-disposition'][0] = empty($_content_disp) ? ($_content_type == 'application/octet_stream' ? 'attachment' : 'inline') . '; filename="' . $_url_parts['file'] . '"' : $_content_disp;
  1175.    
  1176.     if ($_content_length !== false)
  1177.     {
  1178.         if ($_config['max_file_size'] != -1 && $_content_length > $_config['max_file_size'])
  1179.         {
  1180.             function_untuk_halaman_awal_kalo_mau_edit_tampilannya_silahkan_edit_dalam_function_ini(array('which' => 'index', 'category' => 'error', 'group' => 'resource', 'type' => 'file_size'));
  1181.         }
  1182.        
  1183.         $_response_keys['content-length'] = 'Content-Length';
  1184.         $_response_headers['content-length'][0] = $_content_length;
  1185.     }
  1186.    
  1187.     $_response_headers   = array_filter($_response_headers);
  1188.     $_response_keys      = array_filter($_response_keys);
  1189.    
  1190.     header(array_shift($_response_keys));
  1191.     array_shift($_response_headers);
  1192.    
  1193.     foreach ($_response_headers as $name => $array)
  1194.     {
  1195.         foreach ($array as $value)
  1196.         {
  1197.             header($_response_keys[$name] . ': ' . $value, false);
  1198.         }
  1199.     }
  1200.        
  1201.     do
  1202.     {
  1203.         $data = fread($_socket, 8192);
  1204.         echo $data;
  1205.     }
  1206.     while (isset($data{0}));
  1207.        
  1208.     fclose($_socket);
  1209.     exit(0);
  1210. }
  1211.  
  1212. do
  1213. {
  1214.     $data = @fread($_socket, 8192); // silenced to avoid the "normal" warning by a faulty SSL connection
  1215.     $_response_body .= $data;
  1216. }  
  1217. while (isset($data{0}));
  1218.    
  1219. unset($data);
  1220. fclose($_socket);
  1221.  
  1222. //
  1223. // MODIFY AND DUMP RESOURCE
  1224. //
  1225.  
  1226. if ($_content_type == 'text/css')
  1227. {
  1228.     $_response_body = proxify_css($_response_body);
  1229. }
  1230. else
  1231. {
  1232.     if ($_flags['strip_title'])
  1233.     {
  1234.         $_response_body = preg_replace('#(<\s*title[^>]*>)(.*?)(<\s*/title[^>]*>)#is', '$1$3', $_response_body);
  1235.     }
  1236.     if ($_flags['remove_scripts'])
  1237.     {
  1238.         $_response_body = preg_replace('#<\s*script[^>]*?>.*?<\s*/\s*script\s*>#si', '', $_response_body);
  1239.         $_response_body = preg_replace("#(\bon[a-z]+)\s*=\s*(?:\"([^\"]*)\"?|'([^']*)'?|([^'\"\s>]*))?#i", '', $_response_body);
  1240.         $_response_body = preg_replace('#<noscript>(.*?)</noscript>#si', "$1", $_response_body);
  1241.     }
  1242.     if (!$_flags['show_images'])
  1243.     {
  1244.         $_response_body = preg_replace('#<(img|image)[^>]*?>#si', '', $_response_body);
  1245.     }
  1246.    
  1247.     //
  1248.     // PROXIFY HTML RESOURCE
  1249.     //
  1250.    
  1251.     $tags = array
  1252.     (
  1253.         'a'          => array('href'),
  1254.         'img'        => array('src', 'longdesc'),
  1255.         'image'      => array('src', 'longdesc'),
  1256.         'body'       => array('background'),
  1257.         'base'       => array('href'),
  1258.         'frame'      => array('src', 'longdesc'),
  1259.         'iframe'     => array('src', 'longdesc'),
  1260.         'head'       => array('profile'),
  1261.         'layer'      => array('src'),
  1262.         'input'      => array('src', 'usemap'),
  1263.         'form'       => array('action'),
  1264.         'area'       => array('href'),
  1265.         'link'       => array('href', 'src', 'urn'),
  1266.         'meta'       => array('content'),
  1267.         'param'      => array('value'),
  1268.         'applet'     => array('codebase', 'code', 'object', 'archive'),
  1269.         'object'     => array('usermap', 'codebase', 'classid', 'archive', 'data'),
  1270.         'script'     => array('src'),
  1271.         'select'     => array('src'),
  1272.         'hr'         => array('src'),
  1273.         'table'      => array('background'),
  1274.         'tr'         => array('background'),
  1275.         'th'         => array('background'),
  1276.         'td'         => array('background'),
  1277.         'bgsound'    => array('src'),
  1278.         'blockquote' => array('cite'),
  1279.         'del'        => array('cite'),
  1280.         'embed'      => array('src'),
  1281.         'fig'        => array('src', 'imagemap'),
  1282.         'ilayer'     => array('src'),
  1283.         'ins'        => array('cite'),
  1284.         'note'       => array('src'),
  1285.         'overlay'    => array('src', 'imagemap'),
  1286.         'q'          => array('cite'),
  1287.         'ul'         => array('src')
  1288.     );
  1289.  
  1290.     preg_match_all('#(<\s*style[^>]*>)(.*?)(<\s*/\s*style[^>]*>)#is', $_response_body, $matches, PREG_SET_ORDER);
  1291.  
  1292.     for ($i = 0, $count_i = count($matches); $i < $count_i; ++$i)
  1293.     {
  1294.         $_response_body = str_replace($matches[$i][0], $matches[$i][1]. proxify_css($matches[$i][2]) .$matches[$i][3], $_response_body);
  1295.     }
  1296.  
  1297.     preg_match_all("#<\s*([a-zA-Z\?-]+)([^>]+)>#S", $_response_body, $matches);
  1298.  
  1299.     for ($i = 0, $count_i = count($matches[0]); $i < $count_i; ++$i)
  1300.     {
  1301.         if (!preg_match_all("#([a-zA-Z\-\/]+)\s*(?:=\s*(?:\"([^\">]*)\"?|'([^'>]*)'?|([^'\"\s]*)))?#S", $matches[2][$i], $m, PREG_SET_ORDER))
  1302.         {
  1303.             continue;
  1304.         }
  1305.        
  1306.         $rebuild    = false;
  1307.         $extra_html = $temp = '';
  1308.         $attrs      = array();
  1309.  
  1310.         for ($j = 0, $count_j = count($m); $j < $count_j; $attrs[strtolower($m[$j][1])] = (isset($m[$j][4]) ? $m[$j][4] : (isset($m[$j][3]) ? $m[$j][3] : (isset($m[$j][2]) ? $m[$j][2] : false))), ++$j);
  1311.        
  1312.         if (isset($attrs['style']))
  1313.         {
  1314.             $rebuild = true;
  1315.             $attrs['style'] = proxify_inline_css($attrs['style']);
  1316.         }
  1317.        
  1318.         $tag = strtolower($matches[1][$i]);
  1319.  
  1320.         if (isset($tags[$tag]))
  1321.         {
  1322.             switch ($tag)
  1323.             {
  1324.                 case 'a':
  1325.                     if (isset($attrs['href']))
  1326.                     {
  1327.                         $rebuild = true;
  1328.                         $attrs['href'] = complete_url($attrs['href']);
  1329.                     }
  1330.                     break;
  1331.                 case 'img':
  1332.                     if (isset($attrs['src']))
  1333.                     {
  1334.                         $rebuild = true;
  1335.                         $attrs['src'] = complete_url($attrs['src']);
  1336.                     }
  1337.                     if (isset($attrs['longdesc']))
  1338.                     {
  1339.                         $rebuild = true;
  1340.                         $attrs['longdesc'] = complete_url($attrs['longdesc']);
  1341.                     }
  1342.                     break;
  1343.                 case 'form':
  1344.                     if (isset($attrs['action']))
  1345.                     {
  1346.                         $rebuild = true;
  1347.                        
  1348.                         if (trim($attrs['action']) === '')
  1349.                         {
  1350.                             $attrs['action'] = $_url_parts['path'];
  1351.                         }
  1352.                         if (!isset($attrs['method']) || strtolower(trim($attrs['method'])) === 'get')
  1353.                         {
  1354.                             $extra_html = '<input type="hidden" name="' . $_config['get_form_name'] . '" value="' . encode_url(complete_url($attrs['action'], false)) . '" />';
  1355.                             $attrs['action'] = '';
  1356.                             break;
  1357.                         }
  1358.                        
  1359.                         $attrs['action'] = complete_url($attrs['action']);
  1360.                     }
  1361.                     break;
  1362.                 case 'base':
  1363.                     if (isset($attrs['href']))
  1364.                     {
  1365.                         $rebuild = true;  
  1366.                         url_parse($attrs['href'], $_base);
  1367.                         $attrs['href'] = complete_url($attrs['href']);
  1368.                     }
  1369.                     break;
  1370.                 case 'meta':
  1371.                     if ($_flags['strip_meta'] && isset($attrs['name']))
  1372.                     {
  1373.                         $_response_body = str_replace($matches[0][$i], '', $_response_body);
  1374.                     }
  1375.                     if (isset($attrs['http-equiv'], $attrs['content']) && preg_match('#\s*refresh\s*#i', $attrs['http-equiv']))
  1376.                     {
  1377.                         if (preg_match('#^(\s*[0-9]*\s*;\s*url=)(.*)#i', $attrs['content'], $content))
  1378.                         {                
  1379.                             $rebuild = true;
  1380.                             $attrs['content'] =  $content[1] . complete_url(trim($content[2], '"\''));
  1381.                         }
  1382.                     }
  1383.                     break;
  1384.                 case 'head':
  1385.                     if (isset($attrs['profile']))
  1386.                     {
  1387.                         $rebuild = true;
  1388.                         $attrs['profile'] = implode(' ', array_map('complete_url', explode(' ', $attrs['profile'])));
  1389.                     }
  1390.                     break;
  1391.                 case 'applet':
  1392.                     if (isset($attrs['codebase']))
  1393.                     {
  1394.                         $rebuild = true;
  1395.                         $temp = $_base;
  1396.                         url_parse(complete_url(rtrim($attrs['codebase'], '/') . '/', false), $_base);
  1397.                         unset($attrs['codebase']);
  1398.                     }
  1399.                     if (isset($attrs['code']) && strpos($attrs['code'], '/') !== false)
  1400.                     {
  1401.                         $rebuild = true;
  1402.                         $attrs['code'] = complete_url($attrs['code']);
  1403.                     }
  1404.                     if (isset($attrs['object']))
  1405.                     {
  1406.                         $rebuild = true;
  1407.                         $attrs['object'] = complete_url($attrs['object']);
  1408.                     }
  1409.                     if (isset($attrs['archive']))
  1410.                     {
  1411.                         $rebuild = true;
  1412.                         $attrs['archive'] = implode(',', array_map('complete_url', preg_split('#\s*,\s*#', $attrs['archive'])));
  1413.                     }
  1414.                     if (!empty($temp))
  1415.                     {
  1416.                         $_base = $temp;
  1417.                     }
  1418.                     break;
  1419.                 case 'object':
  1420.                     if (isset($attrs['usemap']))
  1421.                     {
  1422.                         $rebuild = true;
  1423.                         $attrs['usemap'] = complete_url($attrs['usemap']);
  1424.                     }
  1425.                     if (isset($attrs['codebase']))
  1426.                     {
  1427.                         $rebuild = true;
  1428.                         $temp = $_base;
  1429.                         url_parse(complete_url(rtrim($attrs['codebase'], '/') . '/', false), $_base);
  1430.                         unset($attrs['codebase']);
  1431.                     }
  1432.                     if (isset($attrs['data']))
  1433.                     {
  1434.                         $rebuild = true;
  1435.                         $attrs['data'] = complete_url($attrs['data']);
  1436.                     }
  1437.                     if (isset($attrs['classid']) && !preg_match('#^clsid:#i', $attrs['classid']))
  1438.                     {
  1439.                         $rebuild = true;
  1440.                         $attrs['classid'] = complete_url($attrs['classid']);
  1441.                     }
  1442.                     if (isset($attrs['archive']))
  1443.                     {
  1444.                         $rebuild = true;
  1445.                         $attrs['archive'] = implode(' ', array_map('complete_url', explode(' ', $attrs['archive'])));
  1446.                     }
  1447.                     if (!empty($temp))
  1448.                     {
  1449.                         $_base = $temp;
  1450.                     }
  1451.                     break;
  1452.                 case 'param':
  1453.                     if (isset($attrs['valuetype'], $attrs['value']) && strtolower($attrs['valuetype']) == 'ref' && preg_match('#^[\w.+-]+://#', $attrs['value']))
  1454.                     {
  1455.                         $rebuild = true;
  1456.                         $attrs['value'] = complete_url($attrs['value']);
  1457.                     }
  1458.                     break;
  1459.                 case 'frame':
  1460.                 case 'iframe':
  1461.                     if (isset($attrs['src']))
  1462.                     {
  1463.                         $rebuild = true;
  1464.                         $attrs['src'] = complete_url($attrs['src']) . '&nf=1';
  1465.                     }
  1466.                     if (isset($attrs['longdesc']))
  1467.                     {
  1468.                         $rebuild = true;
  1469.                         $attrs['longdesc'] = complete_url($attrs['longdesc']);
  1470.                     }
  1471.                     break;
  1472.                 default:
  1473.                     foreach ($tags[$tag] as $attr)
  1474.                     {
  1475.                         if (isset($attrs[$attr]))
  1476.                         {
  1477.                             $rebuild = true;
  1478.                             $attrs[$attr] = complete_url($attrs[$attr]);
  1479.                         }
  1480.                     }
  1481.                     break;
  1482.             }
  1483.         }
  1484.    
  1485.         if ($rebuild)
  1486.         {
  1487.             $new_tag = "<$tag";
  1488.             foreach ($attrs as $name => $value)
  1489.             {
  1490.                 $delim = strpos($value, '"') && !strpos($value, "'") ? "'" : '"';
  1491.                 $new_tag .= ' ' . $name . ($value !== false ? '=' . $delim . $value . $delim : '');
  1492.             }
  1493.  
  1494.             $_response_body = str_replace($matches[0][$i], $new_tag . '>' . $extra_html, $_response_body);
  1495.         }
  1496.     }
  1497.    
  1498.     if ($_flags['include_form'] && !isset($_GET['nf']))
  1499.     {
  1500.         $_url_form      = '<div style="width:100%;margin:0;text-align:center;border-bottom:1px solid #725554;color:#000000;background-color:#F2FDF3;font-size:12px;font-weight:bold;font-family:Bitstream Vera Sans,arial,sans-serif;padding:4px;">'
  1501.                         . '<form method="post" action="' . $_script_url . '">'
  1502.                         . ' <label for="____' . $_config['url_var_name'] . '"><a href="' . $_url . '">Address</a>:</label> <input id="____' . $_config['url_var_name'] . '" type="text" size="80" name="' . $_config['url_var_name'] . '" value="' . $_url . '" /><input type="hidden" name="user_agent" value="'.$_COOKIE['ua'].'">'
  1503.                         . ' <input type="submit" name="go" value="Go" />'
  1504.                         . ' [go: <a href="' . $_script_url . '?' . $_config['url_var_name'] . '=' . encode_url($_url_parts['prev_dir']) .' ">up one dir</a>, <a href="' . $_script_base . '">main page</a>]'
  1505.                         . '<br /><hr />';
  1506.  
  1507.         foreach ($_flags as $flag_name => $flag_value)
  1508.         {
  1509.             if (!$_frozen_flags[$flag_name])
  1510.             {
  1511.                 $_url_form .= '<label><input type="checkbox" name="' . $_config['flags_var_name'] . '[' . $flag_name . ']"' . ($flag_value ? ' checked="checked"' : '') . ' /> ' . $_labels[$flag_name][0] . '</label> ';
  1512.             }
  1513.         }
  1514.  
  1515.         $_url_form .= '</form></div>';
  1516.         $_response_body = preg_replace('#\<\s*body(.*?)\>#si', "$0\n$_url_form" , $_response_body, 1);
  1517.     }
  1518. }
  1519.  
  1520. $_response_keys['content-disposition'] = 'Content-Disposition';
  1521. $_response_headers['content-disposition'][0] = empty($_content_disp) ? ($_content_type == 'application/octet_stream' ? 'attachment' : 'inline') . '; filename="' . $_url_parts['file'] . '"' : $_content_disp;
  1522. $_response_keys['content-length'] = 'Content-Length';
  1523. $_response_headers['content-length'][0] = strlen($_response_body);    
  1524. $_response_headers   = array_filter($_response_headers);
  1525. $_response_keys      = array_filter($_response_keys);
  1526.  
  1527. header(array_shift($_response_keys));
  1528. array_shift($_response_headers);
  1529.  
  1530. foreach ($_response_headers as $name => $array)
  1531. {
  1532.     foreach ($array as $value)
  1533.     {
  1534.         header($_response_keys[$name] . ': ' . $value, false);
  1535.     }
  1536. }
  1537.  
  1538. echo $_response_body;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement