Hey, I'm writing a tutorial on going from HTML to PHProxy, but I need help. What do these parts of the code do? <li><a href="<?php echo $GLOBALS['_script_base'] ?>">URL Form</a></li> HTML: <?php switch ($data['category']) { case 'auth': ?> <div id="auth"><p> <b>Enter your username and password for "<?php echo htmlspecialchars($data['realm']) ?>" on <?php echo $GLOBALS['_url_parts']['host'] ?></b> <form method="post" action=""> <input type="hidden" name="<?php echo $GLOBALS['_config']['basic_auth_var_name'] ?>" value="<?php echo base64_encode($data['realm']) ?>" /> <label>Username <input type="text" name="username" value="" /></label> <label>Password <input type="password" name="password" value="" /></label> <input type="submit" value="Login" /> </form></p></div> <?php break; case 'error': echo '<div id="error"><p>'; switch ($data['group']) { case 'url': echo '<b>URL Error (' . $data['error'] . ')</b>: '; switch ($data['type']) { case 'internal': $message = 'Failed to connect to the specified host. ' . 'Possible problems are that the server was not found, the connection timed out, or the connection refused by the host. ' . 'Try connecting again and check if the address is correct.'; break; case 'external': switch ($data['error']) { case 1: $message = 'The URL you\'re attempting to access is blacklisted by this server. Please select another URL.'; break; case 2: $message = 'The URL you entered is malformed. Please check whether you entered the correct URL or not.'; break; } break; } break; case 'resource': echo '<b>Resource Error:</b> '; switch ($data['type']) { case 'file_size': $message = 'The file your are attempting to download is too large.<br />' . 'Maxiumum permissible file size is <b>' . number_format($GLOBALS['_config']['max_file_size']/1048576, 2) . ' MB</b><br />' . 'Requested file size is <b>' . number_format($GLOBALS['_content_length']/1048576, 2) . ' MB</b>'; break; case 'hotlinking': $message = 'It appears that you are trying to access a resource through this proxy from a remote Website.<br />' . 'For security reasons, please use the form below to do so.'; break; } break; } echo 'An error has occured while trying to browse through the proxy. <br />' . $message . '</p></div>'; break; } ?> HTML: <div id="footer"><a href="http://whitefyre.com/poxy/">PHProxy</a> <?php echo $GLOBALS['_version'] ?></div> HTML: Can someone please help me out. Is the authentication part crucial? Gracias!
1) Is for the URL form 2) Is when you enter a page that gives a popup for username & password 3) That's the footer... it isn't necesarry as that page is offline... so And yes the authentication part is crucial Greetz
1.) A list element determined by php. 2.) So long for a code. Don't care reading. 3.) A code with id name as footer containing a link and a content automatically produced by php.
Ohhh... Thank you. Why doesn't it just pop up like it usually does? Also, does that code show anything in the main page?
Well I don't know why it doesn't.. but the fact is that it doesn't, so that's why you must add it And nope.. you won't see it on the main page, only when browsing Greetz