linking a program
Author |
Message |
beedub
|
Posted: Sun Jun 01, 2003 9:27 am Post subject: linking a program |
|
|
is there any way to link a program. to something on to the internet??/ lets say a text box |
|
|
|
|
|
Sponsor Sponsor
|
|
|
JSBN
|
Posted: Sun Jun 01, 2003 9:45 am Post subject: (No subject) |
|
|
yes there is hold on i'll get you the code
code: |
Net.OpenURLConnection Part of Net module
Syntax Net.OpenURLConnection (urlAddr : string) : int
Description Attempts to open a http connection to pthe URL (Universal Resource Locator) specified by the urlAddr.
If successful, Net.OpenURLConnection returns a network stream descriptor which can be used with the get statement and eof function to read the web page located at the URL.
The program will wait for an indeterminate amount of time to make the connection. If it fails, it will return a non-positive value.
Details The Net module requires a TCP/IP stack to be installed and operating in order to function. It does not communicate using any other protocols
It is possible for Firewalls to interfere with the actions of the Net module, preventing connections from taking place.
Example The following program prints out the contents of the file specified by the user.
var url : string
put "Enter the URL to load: " ..
get url
var netStream : int
var line : string
netStream := Net.OpenURLConnection (url)
if netStream <= 0 then
put "Unable to connect to ", url
return
end if
loop
exit when eof (netStream)
get : netStream, line
put line
end loop
Net.CloseConnection (netStream)
Status Exported qualified.
This means that you can only call the function by calling Net.OpenURLConnection, not by calling OpenURLConnection.
See also Net.CloseConnection.
|
To find moer net commands, go in turing 4.04 and press f10 click on the index tab, and type 'net'. this will give you a list of all the net commands |
|
|
|
|
|
beedub
|
Posted: Sun Jun 01, 2003 3:23 pm Post subject: (No subject) |
|
|
is there any way to to put something in a text field tho?? as if i were copying and pasting the stuff from turing into the text field. |
|
|
|
|
|
Andy
|
Posted: Sun Jun 01, 2003 3:43 pm Post subject: (No subject) |
|
|
hey dude, i just realized something, i can make a hotmail hacker... |
|
|
|
|
|
beedub
|
Posted: Sun Jun 01, 2003 5:02 pm Post subject: (No subject) |
|
|
nice wanna send ...?? |
|
|
|
|
|
Tony
|
Posted: Sun Jun 01, 2003 7:40 pm Post subject: (No subject) |
|
|
well you could open CGI/PHP page with values passed in
"www.compsci.ca/randompage.php?value=blah"
where value=blah is generated by turing. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
PaddyLong
|
Posted: Sun Jun 01, 2003 7:55 pm Post subject: (No subject) |
|
|
I don't think that would work Tony... not unless on the webpage they're using something like php and for their text box they have it set to something like
<input type="text" name="blah" value="<?php print($HTTP_GET_VARS['blah']); ?>">
which they definately wouldn't
but I don't think you can just fill in a text box on the spot like that by adding a url variable |
|
|
|
|
|
Dan
|
Posted: Sun Jun 01, 2003 11:11 pm Post subject: (No subject) |
|
|
ah...the way most php progames get data for pass is from a html fourm with sends it to the php porgame in the format that tony posted. so yes toyns way could wrok, i posted a progame to login in to utipoia game from turing a while ago using the same method. |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
Sponsor Sponsor
|
|
|
|
|