Posted: Mon Dec 19, 2005 2:20 pm Post subject: ViewHTML Procedure
Open's a Website and renders the HTML in a red-green combo to make a little easier to view.
I don't know that much about page redirects and such...so for some websites Turings Net. functions seem to go to the 302/301 redirect sites... I don't know how to work around this...
IF this could be corrected i guess we could see the start of some web based apps...perhaps...
code:
procedure ViewHTML (url : string)
var netStream : int
var net_line : string (1)
netStream := Net.OpenURLConnection (url)
if netStream <= 0 then
put "Unable to connect to ", url, " on port 80"
return
end if
var fileNo : int
open : fileNo, "index.html", write
loop
exit when eof (netStream)
get : netStream, net_line : 1
var flag := false
if net_line = "<" then
color (red)
put net_line ..
write : fileNo, net_line
flag := true
elsif net_line = ">" then
put net_line ..
write : fileNo, net_line
color (green)
flag := false
else
put net_line ..
write : fileNo, net_line
end if
end loop
Net.CloseConnection (netStream)
close : fileNo
end ViewHTML
put "hello"
ViewHTML ("www.digg.com")
Sponsor Sponsor
ecliptical
Posted: Mon Dec 19, 2005 2:23 pm Post subject: (No subject)
Posted: Mon Dec 19, 2005 6:20 pm Post subject: (No subject)
Thats good I guess =) I guess this could be used to make some sort of phisher/scanner. Anyway i figured out how to get past the redirection stuff so I'm going to mess around with a couple of apps and maybe a game as a proof of concept.
Software Aunthentication/Registration/Activation:Program creates unique code which is checked against and online code.
Online Walking Game: Walk around and new levels are downloaded as you reach them.
Thats pretty much it as I don't know yet how I can use turing to upload content to the web...any help?
I was thinking FTP perhaps because it does look like turing has the ports and such setup I'm just not sure how to program it.
Tony
Posted: Tue Dec 20, 2005 10:00 am Post subject: (No subject)
ecliptical wrote:
Thats pretty much it as I don't know yet how I can use turing to upload content to the web...any help?
You could connect through a socket if you have an application server listening for a connection.
I think that a GET request to a PHP or Ruby script would be the easiest