OT But Related - Get Source of a URL

Pierre Sahores psahores at easynet.fr
Sat Aug 17 03:45:01 EDT 2002


Scott Rossi a écrit :
> 
> > What do you want to do with the resulting variable ?
> > Display it back to
> > the webbroswer trough an mt/cgi-script (javascript
> 
> A portion of it, yes.

You can set up a "test.mt" cgi-script witch will parse the needed
portion of the var back to the web alike this :

> #!/home/pierre/mc
> on startup
> # put the html file into var1
>  
>   put url "http://localhost/yourfile.html" into var1
>   
> # strip the unneeded part of var1 there
> 
> ...
>   
> # write minimal set of HTTP headers to stdout
>   
>   put var1 into buffer
>   
>   put "Content-Type: text/html" & cr # to send back var1 as a standard html output
>   # put "Content-Type: text/plain" & cr # to send back var1 as an source file output
>   
>   put "Content-Length:" && the length of buffer & cr & cr
>   put buffer
> end startup
 
> > Which version of IE Mac are you using? Do
> > you also want it to work on Windows, or just on the
> > Mac?
> 
> The latest - 5.1 or similar.  The scripts that work on Windows also seem to
> fail in Netscape 4 so I guess this a pretty much a MacOS limitation. [sigh]
> 
> Thanks anayway.
> 
> Regards,
> 
> Scott Rossi
> Creative Director
> 
> Tactile Media, Multimedia & Design
> Email: scott at tactilemedia.com
> Web: www.tactilemedia.com

-- 
Best Regards, Pierre Sahores

WEB & VPN applications & databases servers
Inspection académique de Seine-Saint-Denis
Qualifier & produire l'avantage compétitif



More information about the metacard mailing list