Ask Me Help Desk

Ask Me Help Desk (
-   Internet & the Web (
-   -   PHP File upload and Perl (

  • Feb 18, 2006, 03:45 AM
    PHP File upload and Perl
    Hi All,

    I am using a perl script to access the webpages designed in PHP.
    I donot know how to automate the file upload part of the site. Can anyone help me.

    FYI:I am using WWW::Mechanize module of perl

  • Feb 18, 2006, 09:44 AM
    I don't quite understand your problem so I'm going to ask a couple of questions.

    You have 2 distinct entities here right?

    1. A php site (on a server)

    2. A perl script (on clients?)

    If it's what I've said, then you'll probably need to look into the actual http protocol. (unless there's some sort of functionality already provided by your WWW lib)

    Hope that helps a little
  • Feb 19, 2006, 10:10 PM
    Yes, you are right.The server is PHP site and my client is perl script.
    I like to know how the Input type file is handled in PHP.Is there any active participation of the browsers(IE,Firefox) in managing the uploaded file.

    I am giving the html input type
    <Input type = file, name = filename, value ="">
  • Feb 20, 2006, 12:47 AM
    PHP handles it exactly the same as if it was a straight html file. It's governed by the http standard, I suggest you look into that, unfortunately I don't know anything beyond that. I wouldn't be surpised if the client sent a request that had a special "resource id" or something, and then sent another request with the actual file contents and in the header the corresponding "resource id" but again, I believe that's part of the http standard, if not , its closely related, and I suggest you start there though.

    Cheers (I know that wasn't the answer you wanted and I'm sorry I can't help more than that)
  • Feb 20, 2006, 05:00 AM
    Thanks for your effort.I am looking into those http standards

  • All times are GMT -7. The time now is 01:27 PM.