Jump to content

jeffreyappel

Members
  • Posts

    70
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by jeffreyappel

  1. The way i solved :

    <form name="mycombo">
    <p><select name="example" size="1">
        <option      value="#Link1">JavaScript Kit</option>
        <option value="#Link2">Coding Forums</option>
          <option> value="#Link3">Dynamic Drive</option>
    </select></p>
        <input type="button" name="test" value="Go!" onClick="go()">
        <form/>
    
    function go(){
    location=
    document.mycombo.example.
    options[document.mycombo.example.selectedIndex].value
    }
    
    
  2. MiniSUSE comes with all the great packages you might need. It offers you a Swiss army knife for all your Linux needs – still it is small enough to fit a CD/DVD or USB drive. You can use it to rescue systems, format drives, check sensors or hack whatever you want. If you are looking for a small, but extremely useful Linux distribution you can get up and running in seconds from the media of your choice, look no further.

  3. There is a simple trick to get this to work though.Download sendmail.zip from http://glob.com.au/sendmail/  and install it.In the php.ini file edit [mail function] section as follows:

     

    [mail function]
    ; For Win32 only.
    ;SMTP =
    
    ; For Win32 only.
    ;sendmail_from =
     
    Open the sendmail.ini and modify the settings to:
    smtp_server=mail.yourdomain.com
    smtp_port=25
    default_domain=yourdomain.com
    pop3_server=mail.yourdomain.com
    pop3_username=you@yourdomain.com
    pop3_password=mysecretpassword
    force_sender=you@yourdomain.com
    
  4. Remember To prevent abuse for sending spam, many email servers require that the client be authenticated as a legitimate user before relaying mail (forwarding it to the recipient's email server). You have specified credentials in IIS; however, PHP does not make use of them.

     

    Here are your options:

     

        Instead of the mail() function, use one of the existing PHP mailer libraries that supports SMTP authentication (PEAR Mail, phpmailer, Swift Mailer, etc.).

     

        Install and configure msmtp or one of the alternatives (here's how to make msmtp work with PHP). PHP will execute the program, which does support SMTP authentication, whenever it has to send a message if you set sendmail_path accordingly.

     

        Change the mail server's configuration to allow relaying mail from the web server's IP address.

     

  5. In the php.ini (you can find this under "c:\program files (x86)\php\{PHP Version}") change these settings:

     

    log_errors = On

     

    Then set error_log to syslog for the windows event log:

     

    error_log = syslog

     

    Or specify a location on disk such as:

     

    error_log = C:\Windows\temp\php_errors.log

     

    Make sure that the error_log or log_error values aren't being set elsewhere in the file.

     

  6. Anyone know how to force URL with SSL with www.

     

     <rewrite>
                <rules>               
                      <rule name="Redirect to HTTPS" stopProcessing="true">
    <match url="(.*)" />
    <conditions><add input="{HTTPS}" pattern="^OFF$" />
    </conditions>
    <action type="Redirect" url="https://www.site.com/{R:0}" redirectType="SeeOther" />
    </rule>       
                </rules>
     </rewrite>
    Better try this:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="Add www" patternSyntax="Wildcard" stopProcessing="true">
                        <match url="*" />
                        <conditions>
                            <add input="{HTTP_HOST}" pattern="www.fabrikam.com" negate="true" />
                        </conditions>
                        <action type="Redirect" url="http://www.fabrikam.com/{R:1}" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>
    

  7. if ($this->validate_ip($ip))
    return $ip;
    }
    }
    }
    if (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_X_FORWARDED']))
    return $_SERVER['HTTP_X_FORWARDED'];
    if (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
    return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
    if (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validate_ip($_SERVER['HTTP_FORWARDED_FOR']))
    return $_SERVER['HTTP_FORWARDED_FOR'];
    if (!empty($_SERVER['HTTP_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_FORWARDED']))
    return $_SERVER['HTTP_FORWARDED'];

    // Return unreliable IP address since all else failed
    return $_SERVER['REMOTE_ADDR'];
    }

    /**
    * Ensures an IP address is both a valid IP address and does not fall within
    * a private network range.
    *
    * @access public
    * @param string $ip
    */
    public function validate_ip($ip) {
    if (filter_var($ip, FILTER_VALIDATE_IP,
    FILTER_FLAG_IPV4 |
    FILTER_FLAG_IPV6 |
    FILTER_FLAG_NO_PRIV_RANGE |
    FILTER_FLAG_NO_RES_RANGE) === false)
    return false;
    self::$ip = $ip;
    return true;
    }

     

  8. Use either 301 (Permanent) Redirect or 302 (Temporary) Redirect in the .htaccess file.This example may direct you:

    # This allows you to redirect your entire website to any other domain permanently.
    Redirect 301 / http://mt-example.com/
    
    # This allows you to redirect your entire website to any other domain temporarily
    Redirect 302 / http://mt-example.com/
    
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.