Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Internet & the Web (https://www.askmehelpdesk.com/forumdisplay.php?f=177)
-   -   PHP File upload and Perl (https://www.askmehelpdesk.com/showthread.php?t=21031)

  • Feb 18, 2006, 03:45 AM
    Novice_perl
    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

    Thanks,
    Novice_perl
  • Feb 18, 2006, 09:44 AM
    Ademan
    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
    -Dan
  • Feb 19, 2006, 10:10 PM
    Novice_perl
    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.

    FYI:
    I am giving the html input type
    <Input type = file, name = filename, value ="">
  • Feb 20, 2006, 12:47 AM
    Ademan
    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)
    -Dan
  • Feb 20, 2006, 05:00 AM
    Novice_perl
    Thanks for your effort.I am looking into those http standards

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