3v4l.org

run code in 300+ PHP versions simultaneously
<?php /******************************************************************* * Glype is copyright and trademark 2007-2013 UpsideOut, Inc. d/b/a Glype * and/or its licensors, successors and assigners. All rights reserved. * * Use of Glype is subject to the terms of the Software License Agreement. * http://www.glype.com/license.php ******************************************************************* * This page allows the user to change settings for their "virtual * browser" - includes disabling/enabling referrers, choosing a user * agent string ******************************************************************/ /***************************************************************** * Initialize glype ******************************************************************/ // Stop caching sendNoCache(); // Start buffering ob_start(); /***************************************************************** * Create content ******************************************************************/ // Return without saving button $return = empty($_GET['return']) ? '' : '<input type="button" value="Cancel" onclick="window.location=\'' . remove_html($_GET['return']) . '\'">'; $returnField = empty($_GET['return']) ? '' : '<input type="hidden" value="' . remove_html($_GET['return']) . '" name="return">'; $agent = empty($_SERVER['HTTP_USER_AGENT']) ? '' : htmlentities($_SERVER['HTTP_USER_AGENT']); // Quote strings function escape_single_quotes($value) { return str_replace("'", "\'", $value); } function remove_html($x) { $x = preg_replace('#"#', '', $x); $x = preg_replace("#'#", '', $x); $x = preg_replace('#<#', '', $x); $x = preg_replace('#>#', '', $x); $x = preg_replace('#\\\\#', '', $x); return $x; } // Get existing values $browser = $_SESSION['custom_browser']; $currentUA = escape_single_quotes($browser['user_agent']); $realReferrer = $browser['referrer'] == 'real' ? 'true' : 'false'; $customReferrer = $browser['referrer'] == 'real' ? '' : escape_single_quotes($browser['referrer']); echo <<<OUT <script type="text/javascript"> // Update custom ua field with value of currently selected preset function updateCustomUA(select) { // Get value var newValue = select.value; // Custom field var customField = document.getElementById('user-agent'); // Special cases switch ( newValue ) { case 'none': newValue = ''; break; case 'custom': customField.focus(); return; } // Set new value customField.value = newValue; } // Set select box to "custom" field when the custom text field is edited function setCustomUA() { var setTo = document.getElementById('user-agent').value ? 'custom' : ''; setSelect(document.getElementById('user-agent-presets'), setTo); } // Set a select field by value function setSelect(select, value) { for ( var i=0; i < select.length; ++i ) { if ( select[i].value == value ) { select.selectedIndex = i; return true; } } return false } // Clear custom-referrer text field if real-referrer is checked function clearCustomReferrer(checkbox) { if ( checkbox.checked ) { document.getElementById('custom-referrer').value = ''; } } // Clear real-referrer checkbox if custom-referrer text field is edited function clearRealReferrer() { document.getElementById('real-referrer').checked = ''; } // Add domready function to set form to current values window.addDomReadyFunc(function() { document.getElementById('user-agent').value = '{$currentUA}'; if ( setSelect(document.getElementById('user-agent-presets'), '{$currentUA}') == false ) { setCustomUA(); } document.getElementById('real-referrer').checked = {$realReferrer}; document.getElementById('custom-referrer').value = '{$customReferrer}'; }); </script> <div class="col-1"> <h2>Edit Browser</h2> <p>Many websites change their website layout according to the browser and operating system of the user.For more anonymity ,you can adjust the settings for your "virtual browser" below. These options affect the information the proxy sends to the target server. </p> <form action="includes/process.php?action=edit-browser" method="post"> <div class="table-wrp"> <table class="browser-table"> <tr> <th colspan="2">User Agent <div class="br-help">(?)<span>Your user agent is sent to the server and identifies the software you are using to access the internet.</span></div></th> </tr> <tr> <td>Choose from presets:</td> <td> <select id="user-agent-presets" onchange="updateCustomUA(this)"> <option value="Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36">Google Chrome 30.0 with Windows 8</option> <option value="Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36">Google Chrome 29.0 with Windows 7</option> <option value="Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0">Mozilla Firefox 25.0 with Windows 7</option> <option value="Mozilla/5.0 (Windows NT 6.0; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0">Mozilla Firefox 24.0 with Windows Vista</option> <option value="Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14">Opera 9.80 on Windows Vista</option> <option value="Opera/12.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.02">Opera 12.80 on Windows XP</option> <option value="Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ) AppleWebKit/523.15 (KHTML, like Gecko) Version/3.0 Safari/523.15">Safari 3.0 on Windows XP</option> </select> </td> </tr> <tr> <td>&#32;</td> <td colspan="1"> <input type="text" id="user-agent" name="user-agent" class="full-width" onchange="setCustomUA();"> </td> </tr> <tr> <td colspan="2" class="small-note"><b>Note:</b> some websites may adjust content based on your user agent.</td> </tr> </table> <table class="browser-table"> <tr> <th colspan="2">Referrer <div class="br-help">(?)<span>The URL of the referring page is normally sent to the server. You can override this to a custom value or set to send no referrer for extra privacy.</span></div></th> </tr> <tr> <td>Send real referrer:</td> <td><input type="checkbox" name="real-referrer" id="real-referrer" onclick="clearCustomReferrer(this)"></td> </tr> <tr> <td>Custom referrer:</td> <td><input type="text" name="custom-referrer" id="custom-referrer" class="full-width" onchange="clearRealReferrer()"></td> </tr> <tr> <td colspan="2" class="small-note"><b>Note:</b> some websites may validate your referrer and deny access if set to an unexpected value</td> </tr> </table> </div> <br> <div style="text-align: center;" class="edit-browsers"><input type="submit" value="Save"> {$return}</div> {$returnField} </form> </div> OUT; /***************************************************************** * Send content wrapped in our theme ******************************************************************/ // Get buffer $content = ob_get_contents(); // Clear buffer ob_end_clean(); // Print content wrapped in theme echo replaceContent($content);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function sendNoCache() in /in/FDIm1:21 Stack trace: #0 {main} thrown in /in/FDIm1 on line 21
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
36.35 ms | 401 KiB | 8 Q