Auto submitting a form that contains a file field

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • laredotornado@zipmail.com

    Auto submitting a form that contains a file field

    Hi,

    I'm using php 5. Does anyone have any code or a function that auto
    submits a form that contains a single INPUT, of type = file?

    Thanks, - Dave
  • Jerry Stuckle

    #2
    Re: Auto submitting a form that contains a file field

    laredotornado@z ipmail.com wrote:
    Hi,
    >
    I'm using php 5. Does anyone have any code or a function that auto
    submits a form that contains a single INPUT, of type = file?
    >
    Thanks, - Dave
    >
    Nope. Can't do it with PHP. PHP is server side, and you need client side.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • laredotornado@zipmail.com

      #3
      Re: Auto submitting a form that contains a file field

      On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
      laredotorn...@z ipmail.com wrote:
      Hi,
      >
      I'm using php 5.  Does anyone have any code or a function that auto
      submits a form that contains a single INPUT, of type = file?
      >
      Thanks, - Dave
      >
      Nope.  Can't do it with PHP.  PHP is server side, and you need client side.
      >
      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstuck...@attgl obal.net
      =============== ===
      Actually this would be a server side function that POSTs to a URL and
      the enctype would be "multipart/form-data". I've found tons of stuff
      that auto-submit forms where you can put the parameters in a query
      string, but with inputs that are of file types, you can't do that ...
      or can you?

      - Dave

      Comment

      • George Maicovschi

        #4
        Re: Auto submitting a form that contains a file field

        Hey Dave,

        Do you really need it to be input=file? can't you just load the file,
        base64_encode it and send it through an input=text?

        Or another method would be making the script with the form in one file
        and then using CURL to post that script and posting the file through
        CURL. Should work.


        On Apr 1, 7:05 am, "laredotorn...@ zipmail.com"
        <laredotorn...@ zipmail.comwrot e:
        On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
        >
        >
        >
        laredotorn...@z ipmail.com wrote:
        Hi,
        >
        I'm using php 5. Does anyone have any code or a function that auto
        submits a form that contains a single INPUT, of type = file?
        >
        Thanks, - Dave
        >
        Nope. Can't do it with PHP. PHP is server side, and you need client side.
        >
        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstuck...@attgl obal.net
        =============== ===
        >
        Actually this would be a server side function that POSTs to a URL and
        the enctype would be "multipart/form-data". I've found tons of stuff
        that auto-submit forms where you can put the parameters in a query
        string, but with inputs that are of file types, you can't do that ...
        or can you?
        >
        - Dave

        Comment

        • Jerry Stuckle

          #5
          Re: Auto submitting a form that contains a file field

          laredotornado@z ipmail.com wrote:
          On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
          >laredotorn...@ zipmail.com wrote:
          >>Hi,
          >>I'm using php 5. Does anyone have any code or a function that auto
          >>submits a form that contains a single INPUT, of type = file?
          >>Thanks, - Dave
          >Nope. Can't do it with PHP. PHP is server side, and you need client side.
          >>
          >--
          >============== ====
          >Remove the "x" from my email address
          >Jerry Stuckle
          >JDS Computer Training Corp.
          >jstuck...@attg lobal.net
          >============== ====
          >
          Actually this would be a server side function that POSTs to a URL and
          the enctype would be "multipart/form-data". I've found tons of stuff
          that auto-submit forms where you can put the parameters in a query
          string, but with inputs that are of file types, you can't do that ...
          or can you?
          >
          - Dave
          >
          No, the POST is from the client end. The result of the POST is server end.

          Client end is NOT php. Neither is the enctype nor the <input type=file tag.

          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          • George Maicovschi

            #6
            Re: Auto submitting a form that contains a file field

            On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
            laredotorn...@z ipmail.com wrote:
            On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
            laredotorn...@z ipmail.com wrote:
            >Hi,
            >I'm using php 5. Does anyone have any code or a function that auto
            >submits a form that contains a single INPUT, of type = file?
            >Thanks, - Dave
            Nope. Can't do it with PHP. PHP is server side, and you need client side.
            >
            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstuck...@attgl obal.net
            =============== ===
            >
            Actually this would be a server side function that POSTs to a URL and
            the enctype would be "multipart/form-data". I've found tons of stuff
            that auto-submit forms where you can put the parameters in a query
            string, but with inputs that are of file types, you can't do that ...
            or can you?
            >
            - Dave
            >
            No, the POST is from the client end. The result of the POST is server end.
            >
            Client end is NOT php. Neither is the enctype nor the <input type=file tag.
            >
            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstuck...@attgl obal.net
            =============== ===
            From what he's saying I'd think he tries to make an auto-poster to do
            posts in another website's form or a form located in another script,
            and that si doable using PHP.

            Comment

            • Jerry Stuckle

              #7
              Re: Auto submitting a form that contains a file field

              George Maicovschi wrote:
              On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
              >laredotorn...@ zipmail.com wrote:
              >>On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
              >>>laredotorn.. .@zipmail.com wrote:
              >>>>Hi,
              >>>>I'm using php 5. Does anyone have any code or a function that auto
              >>>>submits a form that contains a single INPUT, of type = file?
              >>>>Thanks, - Dave
              >>>Nope. Can't do it with PHP. PHP is server side, and you need client side.
              >>>--
              >>>============ ======
              >>>Remove the "x" from my email address
              >>>Jerry Stuckle
              >>>JDS Computer Training Corp.
              >>>jstuck...@at tglobal.net
              >>>============ ======
              >>Actually this would be a server side function that POSTs to a URL and
              >>the enctype would be "multipart/form-data". I've found tons of stuff
              >>that auto-submit forms where you can put the parameters in a query
              >>string, but with inputs that are of file types, you can't do that ...
              >>or can you?
              >> - Dave
              >No, the POST is from the client end. The result of the POST is server end.
              >>
              >Client end is NOT php. Neither is the enctype nor the <input type=file tag.
              >>
              >
              From what he's saying I'd think he tries to make an auto-poster to do
              posts in another website's form or a form located in another script,
              and that si doable using PHP.
              >
              No, I read it as he's trying to automatically submit a form from the
              browser. But it really isn't clear.

              --
              =============== ===
              Remove the "x" from my email address
              Jerry Stuckle
              JDS Computer Training Corp.
              jstucklex@attgl obal.net
              =============== ===

              Comment

              • laredotornado@zipmail.com

                #8
                Re: Auto submitting a form that contains a file field

                On Apr 1, 6:49 am, George Maicovschi <georgemaicovs. ..@gmail.com>
                wrote:
                On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                >
                >
                >
                >
                >
                laredotorn...@z ipmail.com wrote:
                On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                >laredotorn...@ zipmail.com wrote:
                >>Hi,
                >>I'm using php 5.  Does anyone have any code or a function that auto
                >>submits a form that contains a single INPUT, of type = file?
                >>Thanks, - Dave
                >Nope.  Can't do it with PHP.  PHP is server side, and you need client side.
                >
                >--
                >============== ====
                >Remove the "x" from my email address
                >Jerry Stuckle
                >JDS Computer Training Corp.
                >jstuck...@attg lobal.net
                >============== ====
                >
                Actually this would be a server side function that POSTs to a URL and
                the enctype would be "multipart/form-data".  I've found tons of stuff
                that auto-submit forms where you can put the parameters in a query
                string, but with inputs that are of file types, you can't do that ...
                or can you?
                >
                 - Dave
                >
                No, the POST is from the client end.  The result of the POST is serverend.
                >
                Client end is NOT php.  Neither is the enctype nor the <input type=file tag.
                >
                --
                =============== ===
                Remove the "x" from my email address
                Jerry Stuckle
                JDS Computer Training Corp.
                jstuck...@attgl obal.net
                =============== ===
                >
                From what he's saying I'd think he tries to make an auto-poster to do
                posts in another website's form or a form located in another script,
                and that si doable using PHP.- Hide quoted text -
                >
                - Show quoted text -
                Hi, George interpreted my question correctly. George (and anyone
                else), regarding your question
                Do you really need it to be input=file? can't you just load the file, base64_encode it
                I guess it doesn't have to be input=file. But when you say "load the
                file", what do you mean? Thanks, - Dave

                Comment

                • George Maicovschi

                  #9
                  Re: Auto submitting a form that contains a file field

                  On Apr 1, 10:15 pm, "laredotorn...@ zipmail.com"
                  <laredotorn...@ zipmail.comwrot e:
                  On Apr 1, 6:49 am, George Maicovschi <georgemaicovs. ..@gmail.com>
                  wrote:
                  >
                  >
                  >
                  On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                  >
                  laredotorn...@z ipmail.com wrote:
                  On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                  laredotorn...@z ipmail.com wrote:
                  >Hi,
                  >I'm using php 5. Does anyone have any code or a function that auto
                  >submits a form that contains a single INPUT, of type = file?
                  >Thanks, - Dave
                  Nope. Can't do it with PHP. PHP is server side, and you need client side.
                  >
                  --
                  =============== ===
                  Remove the "x" from my email address
                  Jerry Stuckle
                  JDS Computer Training Corp.
                  jstuck...@attgl obal.net
                  =============== ===
                  >
                  Actually this would be a server side function that POSTs to a URL and
                  the enctype would be "multipart/form-data". I've found tons of stuff
                  that auto-submit forms where you can put the parameters in a query
                  string, but with inputs that are of file types, you can't do that ...
                  or can you?
                  >
                  - Dave
                  >
                  No, the POST is from the client end. The result of the POST is server end.
                  >
                  Client end is NOT php. Neither is the enctype nor the <input type=file tag.
                  >
                  --
                  =============== ===
                  Remove the "x" from my email address
                  Jerry Stuckle
                  JDS Computer Training Corp.
                  jstuck...@attgl obal.net
                  =============== ===
                  >
                  From what he's saying I'd think he tries to make an auto-poster to do
                  posts in another website's form or a form located in another script,
                  and that si doable using PHP.- Hide quoted text -
                  >
                  - Show quoted text -
                  >
                  Hi, George interpreted my question correctly. George (and anyone
                  else), regarding your question
                  >
                  Do you really need it to be input=file? can't you just load the file, base64_encode it
                  >
                  I guess it doesn't have to be input=file. But when you say "load the
                  file", what do you mean? Thanks, - Dave
                  A link to the script your are trying to post in would be of much help,
                  but as I see, you should use either CURL or WGET to post it and use --
                  post-file in wget or the equivalent in CURL to do the thing.

                  Hope it helps.

                  George

                  Comment

                  • laredotornado@zipmail.com

                    #10
                    Re: Auto submitting a form that contains a file field

                    On Apr 1, 2:54 pm, George Maicovschi <georgemaicovs. ..@gmail.com>
                    wrote:
                    On Apr 1, 10:15 pm, "laredotorn...@ zipmail.com"
                    >
                    >
                    >
                    >
                    >
                    <laredotorn...@ zipmail.comwrot e:
                    On Apr 1, 6:49 am, George Maicovschi <georgemaicovs. ..@gmail.com>
                    wrote:
                    >
                    On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                    >
                    laredotorn...@z ipmail.com wrote:
                    On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                    >laredotorn...@ zipmail.com wrote:
                    >>Hi,
                    >>I'm using php 5.  Does anyone have any code or a function thatauto
                    >>submits a form that contains a single INPUT, of type = file?
                    >>Thanks, - Dave
                    >Nope.  Can't do it with PHP.  PHP is server side, and you need client side.
                    >
                    >--
                    >============== ====
                    >Remove the "x" from my email address
                    >Jerry Stuckle
                    >JDS Computer Training Corp.
                    >jstuck...@attg lobal.net
                    >============== ====
                    >
                    Actually this would be a server side function that POSTs to a URL and
                    the enctype would be "multipart/form-data".  I've found tons of stuff
                    that auto-submit forms where you can put the parameters in a query
                    string, but with inputs that are of file types, you can't do that ....
                    or can you?
                    >
                     - Dave
                    >
                    No, the POST is from the client end.  The result of the POST is server end.
                    >
                    Client end is NOT php.  Neither is the enctype nor the <input type=file tag.
                    >
                    --
                    =============== ===
                    Remove the "x" from my email address
                    Jerry Stuckle
                    JDS Computer Training Corp.
                    jstuck...@attgl obal.net
                    =============== ===
                    >
                    From what he's saying I'd think he tries to make an auto-poster to do
                    posts in another website's form or a form located in another script,
                    and that si doable using PHP.- Hide quoted text -
                    >
                    - Show quoted text -
                    >
                    Hi, George interpreted my question correctly.  George (and anyone
                    else), regarding your question
                    >
                    Do you really need it to be input=file? can't you just load the file, base64_encode it
                    >
                    I guess it doesn't have to be input=file.  But when you say "load the
                    file", what do you mean?  Thanks, - Dave
                    >
                    A link to the script your are trying to post in would be of much help,
                    but as I see, you should use either CURL or WGET to post it and use --
                    post-file in wget or the equivalent in CURL to do the thing.
                    >
                    Hope it helps.
                    >
                    George- Hide quoted text -
                    >
                    - Show quoted text -
                    Thanks. As I write the script, I will post more. On the server end,
                    how do I retrieve the file? For example, in the wget command, I can't
                    see how you specify the file's parameter name. - Dave

                    Comment

                    • Jerry Stuckle

                      #11
                      Re: Auto submitting a form that contains a file field

                      laredotornado@z ipmail.com wrote:
                      On Apr 1, 2:54 pm, George Maicovschi <georgemaicovs. ..@gmail.com>
                      wrote:
                      >On Apr 1, 10:15 pm, "laredotorn...@ zipmail.com"
                      >>
                      >>
                      >>
                      >>
                      >>
                      ><laredotorn... @zipmail.comwro te:
                      >>On Apr 1, 6:49 am, George Maicovschi <georgemaicovs. ..@gmail.com>
                      >>wrote:
                      >>>On Apr 1, 2:05 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                      >>>>laredotorn. ..@zipmail.com wrote:
                      >>>>>On Mar 31, 10:15 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
                      >>>>>>laredotor n...@zipmail.co m wrote:
                      >>>>>>>Hi,
                      >>>>>>>I'm using php 5. Does anyone have any code or a function that auto
                      >>>>>>>submit s a form that contains a single INPUT, of type = file?
                      >>>>>>>Thanks , - Dave
                      >>>>>>Nope. Can't do it with PHP. PHP is server side, and you need client side.
                      >>>>>>--
                      >>>>>>========= =========
                      >>>>>>Remove the "x" from my email address
                      >>>>>>Jerry Stuckle
                      >>>>>>JDS Computer Training Corp.
                      >>>>>>jstuck... @attglobal.net
                      >>>>>>========= =========
                      >>>>>Actually this would be a server side function that POSTs to a URL and
                      >>>>>the enctype would be "multipart/form-data". I've found tons of stuff
                      >>>>>that auto-submit forms where you can put the parameters in a query
                      >>>>>string, but with inputs that are of file types, you can't do that ...
                      >>>>>or can you?
                      >>>>> - Dave
                      >>>>No, the POST is from the client end. The result of the POST is server end.
                      >>>>Client end is NOT php. Neither is the enctype nor the <input type=file tag.
                      >>>>--
                      >>>>=========== =======
                      >>>>Remove the "x" from my email address
                      >>>>Jerry Stuckle
                      >>>>JDS Computer Training Corp.
                      >>>>jstuck...@a ttglobal.net
                      >>>>=========== =======
                      >>>From what he's saying I'd think he tries to make an auto-poster to do
                      >>>posts in another website's form or a form located in another script,
                      >>>and that si doable using PHP.- Hide quoted text -
                      >>>- Show quoted text -
                      >>Hi, George interpreted my question correctly. George (and anyone
                      >>else), regarding your question
                      >>>Do you really need it to be input=file? can't you just load the file, base64_encode it
                      >>I guess it doesn't have to be input=file. But when you say "load the
                      >>file", what do you mean? Thanks, - Dave
                      >A link to the script your are trying to post in would be of much help,
                      >but as I see, you should use either CURL or WGET to post it and use --
                      >post-file in wget or the equivalent in CURL to do the thing.
                      >>
                      >Hope it helps.
                      >>
                      >George- Hide quoted text -
                      >>
                      >- Show quoted text -
                      >
                      Thanks. As I write the script, I will post more. On the server end,
                      how do I retrieve the file? For example, in the wget command, I can't
                      see how you specify the file's parameter name. - Dave
                      >
                      Don't even try to use wget. Rather, use http and submit the file from
                      your server to the other server.

                      Google on File upload cURL.

                      --
                      =============== ===
                      Remove the "x" from my email address
                      Jerry Stuckle
                      JDS Computer Training Corp.
                      jstucklex@attgl obal.net
                      =============== ===

                      Comment

                      Working...