Jump to content

Ram_Saw

New Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Ram_Saw

  1. I'm searching for mail sender script. I heard about PEAR and mail(). But this ways don't approach me because PEAR it's already third-party environment and mails which were sent by mail() function often goes to the spam.

    I choosed sockets. I'd like to ask you: is it a good way or there are some better ways?

    So an example of its using I found:

    function socketmail($server, $to, $from, $subject, $message) { 
        $connect = fsockopen ($server, 25, $errno, $errstr, 30); 
        fputs($connect, "HELO localhost\r\n"); 
        fputs($connect, "MAIL FROM: $from\n"); 
        fputs($connect, "RCPT TO: $to\n"); 
        fputs($connect, "DATA\r\n"); 
        fputs($connect, "Content-Type: text/plain; charset=iso-8859-1\n"); 
        fputs($connect, "To: $to\n"); 
        fputs($connect, "Subject: $subject\n"); 
        fputs($connect, "\n\n"); 
        fputs($connect, stripslashes($message)." \r\n"); 
        fputs($connect, ".\r\n"); 
        fputs($connect, "RSET\r\n"); 
    } 
    

    But it doesn't work. I'm asking for your help. And idk what to write in $server, for example if it is Gmail?

  2. In this topic I would like to discuss the main principles of framework. I mean framework should not be responsive for printing the information and etc.

    So give some info about this principles, please.

    I can explain why I want my own framework. It'll be more comfortable when you know your own functions. Plus Its better for security.

    P.S. idk maybe It's better to put this top in the other thread.

  3. Hi, guys. I have some problems. I have an html code:

    <html>
        <head>
            <title>TODO supply a title</title>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width">
        </head>
        <body>
            <form enctype="multipart/form-data" action="upload_check.php" method="post">
                <input type="hidden" name="MAX_FILE_SIZE" value="30000">
                <input type="file" min="0" max="100" name="userfile[]" multiple="true" /><br />
                <input type="submit" value="Post">
            </form>
        </body>
    </html>
    

    So to check if I received some files:

    echo $_FILES['userfile']['size'][0];
    echo $_FILES['userfile']['type'][0];
    echo $_FILES['userfile']['size'][1];
    echo $_FILES['userfile']['type'][1];
    echo $_FILES['userfile']['size'][2];
    echo $_FILES['userfile']['type'][2];
    echo $_FILES['userfile']['size'][3];
    echo $_FILES['userfile']['type'][3];
    

    It's just for example. And what I see? I chose these first file(I attached) and the size was 0.

    But! When I chose the second file, it printed: 1005image/gif

     

    I don't see the difference betweet them. *.pdf files it doesn't want to receive too. But I took the system image with extension - .png one more time and PHP-script printed NOT 0 size.

    So I decided that it's because of Apache settings. I changed the upload_file_size from 2Mb(it's too much for pictures anyway) to 20Mb.

    It didn't help.

     

    So I'm asking you for help!

    Thanks!

    post-166984-0-70704700-1388876256_thumb.png

    post-166984-0-86444200-1388876283.gif

×
×
  • 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.