Help!

Discussion in 'HTML & Website Design' started by Teh-Uploader, Jun 3, 2007.

Thread Status:
Not open for further replies.
  1. #1
    My proxy layout, I am trying to code isn't working, anybody help me?

    http://www.lucidnet.com/~w00tage/proxy/gothic/

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Gothic4me</title>
    <style type="text/css">
    <!--
    body {
    		background-image: url(images/background.gif);
    		background-repeat: no-repeat;
    		background-color: #000000;
    		margin: 0px;
    }
    #text {
    		text-align: center;
    		color: #FFFFFF;
    		font-family: "Trebuchet MS";
    		font-size: 16px;
    }
    .large {
    		font-size: 18px;
    		font-family: "Georgia";
    }
    -->
    </style>
    </head>
    
    <body>
    
    <div id="logo">
    				<img src="images/logo.gif" />
    </div>
    
    <div id="text">
    				Welcome to Gothic4Me.info. The newest internet proxy allowing you to visit any sites you
    				want to go on.
    				<br /><br />
    				</div><?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;
    }
    ?>
    
    				
    				<center><span class="large">WEBSITE URL:</span>
    				<br />
    				
    				<!-- Form -->
    				<form action="http://www.lucidnet.com/~w00tage/proxy/gothic/" target="parent" method="default">
    
    				
    				<input type="text" style="border: 0px; background-image: url(images/form_bg.gif); width: 473px; height: 18px; padding: 8px; font-family: 'Trebuchet MS'; font-size: 14px; color:#FFFFFF;" />
    				
    				<br /><br />
    				
    				<input type="submit" value="" style="border: 0px; background-image: url(images/open.gif); width: 100px; height: 35px; font-family: 'Trebuchet MS'; font-size: 14px; color:#FFFFFF;" />
    				
    				</form>
    				<!-- / Form --></center>
    </div>
    
    </body>
    </html>
    
    PHP:

    Many thanks.
     
    Teh-Uploader, Jun 3, 2007 IP
  2. pangea

    pangea Guest

    Messages:
    557
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are you intending on writing this as your own proxy script, or are you looking to hook it up to another script?

    If the second option, you need to check where the form is being submitted to. If the first, i dont know - im not that good at PHP and so dont know if that works or not!
     
    pangea, Jun 3, 2007 IP
  3. Teh-Uploader

    Teh-Uploader Peon

    Messages:
    1,118
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i just want that to be hooked up to phpproxy
     
    Teh-Uploader, Jun 3, 2007 IP
  4. smalldog

    smalldog Peon

    Messages:
    66
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Teh Uploader graphic design of your web is very nice, otherwise i think that your code lacks the logic. There is a form with input for URL, but this input is unnamed, that means, when you post this form nothing happens. And nothing happens too, if you name this input, because there isn't simply the working part in the php block.
     
    smalldog, Jun 3, 2007 IP
  5. GMROCKS

    GMROCKS Active Member

    Messages:
    648
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Is it PHP erroring you or what?

    what exactly is wrong.
    (make the method of your form = "GET")
     
    GMROCKS, Jun 3, 2007 IP
  6. Teh-Uploader

    Teh-Uploader Peon

    Messages:
    1,118
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I got it to work!!!!!!!!!!111

    or not..

    atlest it fines the site..?
     
    Teh-Uploader, Jun 3, 2007 IP
Thread Status:
Not open for further replies.