r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Web] Everything web development related

Louis
3-Mar-2005
[519x2]
Here is the script I used to download the files.  

rebol []

page: read http://militarygetsaved.tripod.com/id23.htm

links: []

parse page [some [thru {<A HREF="} copy temp to {"} (append links 
temp)] to end]

foreach link links [
	if find link "_ibcl.htm" [

  write to-file link read to-url rejoin ["http://militarygetsaved.tripod.com/"
  link]
	]
]
None of the files will display.  Here is the link to the smallest 
file:

http://militarygetsaved.tripod.com/micronesia_ibcl.htm
Ammon
3-Mar-2005
[521]
So your link generator is working but when you try view the links 
that it extracts they aren't displaying?
Louis
3-Mar-2005
[522x2]
Correct.  I used the same script to download some rebol docs, however, 
and they display.
Of course, I changed the urls to download  the rebol docs.
Ammon
3-Mar-2005
[524x2]
Ok, cause it looks like that the server isn't sending my browser 
the page.
The link you posted never actually displays...
Louis
3-Mar-2005
[526x2]
Hummmm.  The lind displays for me.
If I try to open the downloaded file from my harddrive with Foxfire, 
I get an error message saying the file cannot be found!  But it is 
there and can be opened with my text editor.
Ammon
3-Mar-2005
[528x3]
Ok, it is there now. Wonder why it didn't come up before...
That is because you saved the frameSET page.  It is going to attempt 
to load the frames but it also has support for no frames.  You could 
parse out the Frameset tags and it should display just fine...
Frameset-start: "<FRAMESET"  Frameset-end: "<noframes>"
Louis
3-Mar-2005
[531x2]
Ok, many thanks!
Thanks again, Ammon.  Your solution worked.
Ammon
3-Mar-2005
[533]
NP, glad to help. ;-)
Brett
20-Mar-2005
[534]
Any recommendations for a freeware website log analysis program?

I want it to run on a windows desktop, analyse logs downloaded from 
a website, and be *really* easy to use because I'll be setting it 
up for a non-programmer - and I don't want support calls ;-)
Tomc
20-Mar-2005
[535]
AWStats
Brett
21-Mar-2005
[536]
Thanks
Micha
21-Mar-2005
[537x2]
<html>
<head>
<title>JavaScript Window Close Example 1</title>

<script language="JavaScript1.2">


netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesRead");
function openpanel()
{
panel = window.open("http://www.onet.pl","mywindow","");

}

function closepanel()
{

panel.close();


}


function readpanel()
{

alert(panel.location.host);


}


</script>
</head>
<body>
<p>
<a href="javascript: openpanel()">Open Popup Window</a>
</p>
<p>
<a href="javascript: closepanel()">Close the Popup Window</a>
</p>
<p>
<a href="javascript:readpanel()"> Read panel window</a>
</p>
</body>
</html>
readpanel  not act .
plis help
Anton
21-Mar-2005
[539x3]
javascript:readpanel()

   -->  Error: uncaught exception: Permission denied to get property 
   Location.host
javascript: readpanel()

  -->  Error: panel is not defined  Source File: file:///d:/Anton/Dev/Rebol/View/list-demos/Micha's-javascript-page.html 
   Line: 26
No no sorry... mmmmm.. hard.
Permission denied...
 is the real error.
Ammon
24-Mar-2005
[542]
Hm... I'm trying to parse a webpage and strip all HTML tags from 
it but my approach isn't work.  Grr!
Sunanda
24-Mar-2005
[543]
foreach item load/markup read http://www.rebol.com[if string? item 
[print item]]
Ammon
24-Mar-2005
[544x2]
load/markup...  That's it...
Thanks
Geomol
29-Mar-2005
[546x2]
I have a problem with HTTPS over a proxy. I'm using REBOL/Command 
2.5.6.3.1, that came with our SDK. This version first need the HTTPS 
protocol to be activated using this code:


net-utils/net-install HTTPS make system/schemes/http/handler [] 443

system/schemes/https: make system/schemes/https [user-agent: reform 
["REBOL" system/product system/version]]

I activated trace by typing: trace/net on

Our proxy is set up ok, as I can read the internet with a browser 
using it (both HTTP and HTTPS).
Now if I in REBOL do this:

>> s: read https://webservices.rki.dk

I get:

URL Parse: none none webservices.rki.dk none none none
Net-log: ["Opening" "ssl" "for" "HTTPS"]
connecting to: webservices.rki.dk
Net-log: {CONNECT webservices.rki.dk:443 HTTP/1.1
Host: webservices.rki.dk:443

}
Net-log: "HTTP/1.0 200 Connection established"
Net-log: {GET https://webservices.rki.dk:443/ HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL Command 2.5.6.3.1
Host: webservices.rki.dk:443
}
Net-log: none

** User Error: Error.  Target url: https://webservices.rki.dk:443/ 
could not be
retrieved.  Server response: none
** Near: s: read https://webservices.rki.dk
I see two possibilities:

1) The proxy is not supporting tunneling, as required by reading 
the REBOL documentation http://www.rebol.com/docs/ssl.html
2) There's a bug in the REBOL/Command, I'm using.

Any ideas would be very much appreciated!
Graham
29-Mar-2005
[548]
does it work without the proxy?
Geomol
29-Mar-2005
[549]
Yes, I get this result:

>> s: read https://webservices.rki.dk
URL Parse: none none webservices.rki.dk none none none
Net-log: ["Opening" "ssl" "for" "HTTPS"]
connecting to: webservices.rki.dk
Net-log: {GET / HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL Command 2.5.6.3.1
Host: webservices.rki.dk:443
}
Net-log: "HTTP/1.1 200 OK"
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
== {
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
  <HEAD>
    <title>RKI Webservices</title>
    <meta na...
Graham
29-Mar-2005
[550x2]
I guess a web browser works ok?
with the proxy...
Geomol
29-Mar-2005
[552x3]
Yes.
I tested with Mozilla.
And I'm sure, I'm going through the proxy with the browser, as I 
tried a wrong TCP/IP port and got a proxy error. With the rigth port, 
it works ok.
Graham
29-Mar-2005
[555]
and can you read non ssl pages thru the proxy with rebol?
Geomol
29-Mar-2005
[556x2]
Yes, like this:

>> s: read http://www.rebol.com
URL Parse: none none www.rebol.com none none none
Net-log: ["Opening" "tcp" "for" "HTTP"]
connecting to: www.rebol.com
Net-log: {GET http://www.rebol.com/HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL Command 2.5.6.3.1
Host: www.rebol.com
}
Net-log: "HTTP/1.0 200 OK"
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
Net-log: ["low level read of " 2048 "bytes"]
== {<html>
<head>

<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<title>REBOL Technologies</title>
<style ...
And if I try with a wrong TCP/IP port configuration (like I did with 
the browser test), I get this:

>> s: read http://www.rebol.com
URL Parse: none none www.rebol.com none none none
Net-log: ["Opening" "tcp" "for" "HTTP"]
connecting to: www.rebol.com
** Access Error: Cannot connect to 193.3.239.91
** Where: open-proto
** Near: s: read http://www.rebol.com

So I am going through the proxy with REBOL.
Graham
29-Mar-2005
[558x2]
so, the problem is most likely with Rebol.
Have u tried using curl ?
Geomol
29-Mar-2005
[560]
No, what is curl?
Graham
29-Mar-2005
[561x5]
it's a library and also command line utlity for doing web stuff.
curl is a command line tool for transferring files with URL syntax, 
supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and 
LDAP. Curl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP 
uploading, HTTP form based upload, proxies, cookies, user+password 
authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file 
transfer resume, proxy tunneling and a busload of other useful tricks.
http://curl.haxx.se/
I used it before I got command.
wrote results out to data files, and then parsed the results out 
with rebol.
Carl
29-Mar-2005
[566]
Geomol: What proxy are you using?
Geomol
29-Mar-2005
[567]
Carl: I have to check that at work tomorrow (I didn't set it up). 
We're testing on a proxy, and another one is at a customer, where 
it doesn't work either. The customer is the norwegian oil company 
Statoil, and we have their words, that it supports "tunnelling", 
but I'm sceptical as usual. ;-)
Romano
29-Mar-2005
[568]
Geomol, how you set the proxy in Rebol?