Results 1 to 5 of 5

Thread: Http Post & Php Error

  1. #1
    Join Date
    Feb 2010
    Posts
    638

    Http Post & Php Error

    Hi all,

    I built an midlet. I do not have permission to modify php.ini, can be as follows:
    Code:
    ini_set ("display_errors", "On");
    error_reporting (E_ALL | E_STRICT);
    Of course, if we can modify the php.ini, then, as wecan:
    display_errors = On
    error_reporting = E_ALL & ~ E_NOTICE.
    Please suggest.

  2. #2
    Join Date
    Oct 2005
    Posts
    2,393

    Http Post & Php Error

    You need to try this code:
    Code:
    <? Php
    /**
    * @ Author wyt
    *
    */
    class zip (
    private $ _zipObj = null;
    private $ _zipfcArr = array ();
    private $ _basePath = null;
    private $ _zipName;
    /**
    * Init
    * @ Param zip file name $ zipName
    */
    function __construct ($ zipName) (
    $ This-> _zipName = $ zipName;
    check and reply.

  3. #3
    Join Date
    Nov 2005
    Posts
    1,323

    Http Post & Php Error

    I will give you the PHP's data and time function for try :
    Code:
    date and time function date ()
    1, Year - Month - Day
    echo date ('Y-m-j');
    2007-02-6
    echo date ('y-n-j');
    07-2-6
    Uppercase Y, said four-digit years, while the lowercase y expressed in the double digits;
    Lower case m that the number of the month (with leading), while the lowercase n indicates the month without leading figures.
    echo date ('Y-M-j');
    2007-Feb-6
    echo date ('Y-m-d');
    2007-02-06
    Uppercase M, said the three short months ......

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Http Post & Php Error

    You need to construct post request of the head:
    Code:
    $ Header = "POST / mobile / try.php HTTP/1.1/r/n";
    $ Header .= "Host: 127.0.0.1/r/n";
    $ Header .= "Referer: / mobile / sendpost.php / r / n";
    $ Header .= "Content-Type: application / x-www-form-urlencoded / r / n";
    $ Header .= "Content-Length:". $ Length. "/ R / n";
    $ Header .= "Connection: Close / r / n / r / n";
    / / Add the string post
    $ Header .= $ params. "/ R / n";
    / / Send the post data
    fputs ($ fp, $ header);
    $ Inheader = 1;
    while (! feof ($ fp)) (
    $ Line = fgets ($ fp, 1024); / / Remove request packet only displays the first page of the return data
    if ($ inheader & & ($ line == "/ n" | | $ line == "/ r / n")) (
    $ Inheader = 0;
            }
    if ($ inheader == 0) (
    echo $ line;
            }
        }
    fclose ($ fp);
    Check and reply.

  5. #5
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Http Post & Php Error

    Similar to the dreamhost hosting service providers such, is to show the use of fopen. The curl can be achieved using the php support for FTP, FTPS, HTTP HTPPS SCP SFTP TFTP TELNET DICT FILE and LDAP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTT-based upload formats, agent, cookie, user + password to prove, file transfer resume, http proxy access to the most commonly used, is based on the http the get and post methods.

Similar Threads

  1. How to resolve HTTP error Precondition Failed error message?
    By Bengal Tiger in forum Networking & Security
    Replies: 3
    Last Post: 06-04-2012, 01:33 AM
  2. How to fix HTTP error 307 Temporary Redirect (since HTTP/1.1)?
    By Charu Sharma in forum Networking & Security
    Replies: 6
    Last Post: 05-04-2012, 01:14 AM
  3. Replies: 4
    Last Post: 27-11-2011, 10:11 PM
  4. Replies: 5
    Last Post: 12-09-2011, 10:50 PM
  5. To POST http WebRequest!
    By RadhaV in forum Software Development
    Replies: 2
    Last Post: 02-02-2009, 09:38 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,420,296.31958 seconds with 17 queries