Saving a remote file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • houghi

    Saving a remote file

    I want to save a remote file. The Remote file is created by google maps
    and has the name maps.klm
    What I intend to do is the following
    1) Make a route, like http://tinyurl.com/5oknap on the maps.google.com
    website
    2) paste that URL on my site and add "&output=km l" without the quotes to
    it.
    3) When calling the complete URL (like http://tinyurl.com/5durgg) in a
    browser, it will ask to save the file maps.kml

    What I want is to have this on my server without it asking to save it
    first. So just copy the URL and the have it saved all in one go.

    Or must I first save the file maps.kml localy and then save it remotely?

    houghi
    --
    > Beware of he who would deny you access to information, <
    > for in his heart he dreams himself your master. <
    > Commissioner Pravin Lal: "U.N. Declaration of Rights" <
  • Jerry Stuckle

    #2
    Re: Saving a remote file

    houghi wrote:
    I want to save a remote file. The Remote file is created by google maps
    and has the name maps.klm
    What I intend to do is the following
    1) Make a route, like http://tinyurl.com/5oknap on the maps.google.com
    website
    2) paste that URL on my site and add "&output=km l" without the quotes to
    it.
    3) When calling the complete URL (like http://tinyurl.com/5durgg) in a
    browser, it will ask to save the file maps.kml
    >
    What I want is to have this on my server without it asking to save it
    first. So just copy the URL and the have it saved all in one go.
    >
    Or must I first save the file maps.kml localy and then save it remotely?
    >
    houghi
    If you're requesting it from your local machine, there's no way to
    directly save it on the server because it's not on the server.

    To get it at the server, you have to request it from the server. It
    shouldn't be that hard to do - just enter the information you want into
    a form on your server then request the page using cURL.

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

    Comment

    • houghi

      #3
      Re: Saving a remote file

      Jerry Stuckle wrote:
      If you're requesting it from your local machine, there's no way to
      directly save it on the server because it's not on the server.
      No, the request comes from http://houghi,org and requests

      To get it at the server, you have to request it from the server. It
      shouldn't be that hard to do - just enter the information you want into
      a form on your server then request the page using cURL.
      Great. That was what I needed. Thanks. I am now using
      http://be2.php.net/manual/en/curl.examples.php#83541 and worked it into
      http://houghi.org/tomtom/test02.php (code on
      http://houghi.org/tomtom/test02.phps)

      I appologize for the hart attacks people will get watching the code. ;-)


      houghi
      --
      > Beware of he who would deny you access to information, <
      > for in his heart he dreams himself your master. <
      > Commissioner Pravin Lal: "U.N. Declaration of Rights" <

      Comment

      Working...