Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 unknown net error?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
unknowngiver




PostPosted: Sun Jun 04, 2006 12:03 pm   Post subject: unknown net error?

Hey
i dont know why i am getting some "unknown net error" @ this line?

code:

            get : netStream, net1Line
Sponsor
Sponsor
Sponsor
sponsor
unknowngiver




PostPosted: Tue Jun 06, 2006 9:44 am   Post subject: (No subject)

hey anyone there?
dan told me that it has to do with the php file..and we fixed it and it was working fine..then my friend modified the file grr and its not working again...i checked the PHP file but it looks fine to me...here is how it looks like:

code:

<?$username = $_GET['user'];
$pass = $_GET['pass'];
$email = $_GET['email'];
$country = $_GET['country'];
$registerpass = $_GET['registerpass'];
$dbusername="zubair";
$dbpassword="";
$database= "z_game";
if ($registerpass == "z3nixrul3s") {
mysql_connect(localhost, $dbusername, $dbpassword);
@mysql_select_db($database) or die("Unable to select database");
$query= "INSERT INTO user(id, username, pass, email, lastlogin, health, country, level, armysize) VALUES (NULL, '$username', '$pass', '$email', NULL, 100, '$country', 1, 1)";
mysql_query($query);
echo "thanks";
}
else {
echo "error";
}?>
Dan




PostPosted: Tue Jun 06, 2006 3:17 pm   Post subject: (No subject)

Please post a copy of the html file outputed by your php script and a copy of the php script. Just copy and pasting it in to a code tag dose not let me see if there are any wired chars that turing will not like since our site whould strip them out of your post.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Guest




PostPosted: Tue Jun 06, 2006 3:24 pm   Post subject: (No subject)

Your probly getting an error because there is nothing to read from the connection. To get information from a site, the way I do it is:
code:

var stream := Net.OpenConnection(URL,25)
get : stream, line
put line

That's all I know of. Sites such as Google and stuff may not let you get data from them for some reason. I test out net connections with "www.putfile.com" and "www.mrkurz.ca" because Turing connects to them faster, I'm guessing due to traffic issues.[/code]
[Gandalf]




PostPosted: Tue Jun 06, 2006 6:56 pm   Post subject: (No subject)

vahnx, the problem with your code is that you are assuming that everything uses port 25, which is most definately not the case. What you have experienced, SMTP, uses port 25, but protocols use other ports. For example, web pages use port 80, ftp uses port 21, etc.
Dan




PostPosted: Tue Jun 06, 2006 7:05 pm   Post subject: (No subject)

@vahnx: All thougth that could be a cuase of such an error, it is not in this case since his turing code (witch he did not post here) checks for EOF.

Also he is not using Net.OpenConnection but rather the URLConnection for webpages.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
unknowngiver




PostPosted: Wed Jun 07, 2006 10:44 am   Post subject: (No subject)

hey
here is the PHP file



register.txt
 Description:
i renamed the php to .txt because the extension .php was not allowed

Download
 Filename:  register.txt
 Filesize:  641 Bytes
 Downloaded:  78 Time(s)

Guest




PostPosted: Wed Jun 07, 2006 12:28 pm   Post subject: Dont Bash Me Yet Forum Boys...

Hacker Dan and Gandalf, I was just showing him an example of why he was getting the error. "He is probably getting the error because there was nothing to read from the connection". The port had nothing to do with it, make it 5055 for all I care =). Just saying he has to make the connection before he gets the data. And if there was nothing to read from the connection, weither be URL or direct donnection, you'll get the error. But some websites will not display specific information.
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Wed Jun 07, 2006 1:50 pm   Post subject: (No subject)

unknowngiver wrote:
hey
here is the PHP file


Humm, well i do not see any odd chars in there like last time. Maybe you could post your turing code as well.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
unknowngiver




PostPosted: Wed Jun 07, 2006 7:31 pm   Post subject: (No subject)

okie
here is the code Smile
[scared..]



game.zip
 Description:

Download
 Filename:  game.zip
 Filesize:  437.82 KB
 Downloaded:  60 Time(s)


game.zip
 Description:

Download
 Filename:  game.zip
 Filesize:  437.82 KB
 Downloaded:  57 Time(s)

unknowngiver




PostPosted: Thu Jun 08, 2006 4:21 pm   Post subject: (No subject)

anyone?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 11 Posts ]
Jump to:   


Style:  
Search: