34 users online (0 members and 34 guests)  


  Results 1 to 12 of 12

Related

  1. Serving up html using cgi-perl    Forum: CGI Perl Forum
    Replies: 4
  2. Perl/HTML issue    Forum: CGI Perl Forum
    Replies: 0
  3. How to email a HTML url in Perl    Forum: CGI Perl Forum
    Replies: 0
  4. Replies: 1
  5. Replies: 0
  1. #1
    ecoli01's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    7

    Question A question about the html&perl

    I have a couple of questions about the file name and path on a web server. Thank you very much in advance.

    1)Take http://www.google.com/mac as example, what is the html file name that is used to load this page? (apparently it is not mac/index.html)

    2)How to save a image from web to local computer use perl, which function in what module can do it?

    Thanks again

  2. #2
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    1) It does not have to be an html extension, could be anything, just like this page is showthread.php

    2) I do not follow the question, once the image is viewed on the web page it is automatically on the viewers computer.

    Dave

  3. #3
    ecoli01's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    7
    1) You mean the "mac" in that url is a file, not a path, right?
    2)My question is how to use perl script to get the image file from remote web server, and save it on the hard disk of the local computer. (For example, use perl script to retrieve file http://www.google.com/sitesearch/mac.gif and save it on my pc)

    Thanks in advance

  4. #4
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    1) mac is a folder, we do not know what the default page is called or its extension. If you are trying to figure out a file path for a cgi script you should contact your host. Do not get a file path and a URL confused.

    2) I cannot help you

  5. #5
    ecoli01's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    7
    1) How to explain http://www.google.com/mac and http://www.google.com/mac/ are different?

    2) From which forum or which section of this forum has a better chance to get the answer for my second question.

    Thanks

  6. #6
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    You are in the right forum, just the wrong person trying to help

  7. #7
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    I'll try:

    http://www.google.com/mac
    http://www.google.com/mac/ It could be ANYTHING loaded in there. Its in complete control of the server owners.

    In fact, if you factor in apache's mod_rewrite function, it could be a complete false server path altogether. http://www.google.com/mac could actually be loading http://www.google.com/made-up.dingle?dir=/mac you just can't tell without contacting the server owners.


    As to the perl copy on local machine, it could be done as long as the Perl script is ON the local machine, and of course the Perl interpreter is also installed. If you meant a web-server installed CGI script to do this, then no, it can't.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  8. #8
    ecoli01's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    7
    Dear QuiteDean,

    Thank you very much for your answer. I still didn't get the answer for my second question. What I want to know is which perl function (and/or in what module, the perl can be runed on the local computer and doesn't have to be a CGI) can be used to get the web image file (forexample: gif) to the local hard drive.(just like get(url) function in LWP module can get web page to the local computer).

    Thanks again for your help.

  9. #9
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Ahha, if its a local perl script no worries, just use the Grab Extension
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  10. #10
    ecoli01's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    7
    Dear QuietDean,

    Thank you very very much. That is very help, one more question, this Grab Extension can be used to get the image file. Are there any method avaliable in perl to get any binary file from internet?

  11. #11
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    I dont know any off the top of my head, try having a look at www.hotscripts.com or www.cpan.org and useing the searches there.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  12. #12
    ecoli01's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    7
    Thanks QuietDean, I got it. It is much simpler than I thought, just get the file from the internet, and save it in binmode. Thanks a lot, have great week.



Tags for this Thread