Connecting Tech Pros Worldwide Help | Site Map

Saving a remote file

  #1  
Old November 15th, 2008, 09:45 PM
houghi
Guest
 
Posts: n/a
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=kml" 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
--
Quote:
> 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" <
  #2  
Old November 15th, 2008, 10:25 PM
Jerry Stuckle
Guest
 
Posts: n/a

re: Saving a remote file


houghi wrote:
Quote:
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=kml" 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@attglobal.net
==================
  #3  
Old November 16th, 2008, 02:05 AM
houghi
Guest
 
Posts: n/a

re: Saving a remote file


Jerry Stuckle wrote:
Quote:
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
http://maps.google.com
Quote:
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
--
Quote:
> 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" <
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing to a remote file Jeff answers 6 October 16th, 2008 05:15 PM
File details Jaez answers 1 October 19th, 2007 11:15 AM
File access problems Duffman answers 1 November 23rd, 2005 06:37 AM
login errors editing remote pages Karl Lang answers 0 November 18th, 2005 04:38 PM