non working asp status script
I converted the php online offline script to asp, wasnt working though so figured i would post it here and see if anyone can see whatsup with it. I dont got the time to fiddle around with it.
Code:
<%
Dim gv_server(), gv_connection
%> <%
gv_server('name') = "MyPT"
gv_server('host') = "127.0.0.1"
gv_server('port') = "10007"
gv_connection = @fsockopen(gv_server("host"), $server["port"], $ERROR_NO, $ERROR_STR, (float)1 & 5)
Response.Write "{" & server['name'] & "} PristonTale server is "
If gv_connection then
fclose(gv_connection);
Response.Write "<font color=""green"">online</font>"
Else
Response.Write "<font color=""red"">offline</font>"
End If
%>
Re: non working asp status script
sure is port 10007 ? not port 10009?
[edit]
mine wasnt working. i changed port to 10009 and it works.
i guess comes down to what ports u opened on ur router ?
Re: non working asp status script
You used this script on port 10009 and it worked? bcuz i had hanged it to ports 10009 b4 and it didnt work..
edit: still dont work Crucifix PT
Re: non working asp status script
interesting.
what ports are open on ur server?
i found my clans n website didnt work (script incl.) because of windows firewall -.-
i disabled firewall and changed the port to 10009 (because in router that is the ports in which i have open) and it workd.
if ur clans run port 80 just try that ahah.
oh urs is a scripting error.
i thort u ment it just showd as offline.
i dont know about the scripting
why dont u just use it as the php?
do what i did.
load the php 1 as a server.php into ur web directory.
then go <iframe src="server.php" width=400px height=150px border=0></iframe>
look on mi site n u'll see.
Re: non working asp status script
i like asp alot better xD... lol
Re: non working asp status script
for something as small as an online offline script?
why bother.
if ur pro wif asp can u help me have just a register box for the thing on mi site? lol.
and the skill 100% asp script.
does it work for any1 else?
it doesnt for me -.-
Re: non working asp status script
I can give you what i use... xD hold on
Re: non working asp status script
here is my register.asp script just copy and paste it in a register.asp file, what your using is kinda "sloppy"
Code:
<%
if request.querystring("reg")<> "" then
Set Conn = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={SQL Server};SERVER=FUSIONTECH;UID=sa;PWD=aafsafagw;DATABASE=AccountDB"
name=request.form("user")
pass=request.form("pass")
Conn.open DSNtest
'First check if account is registered before ?
strsql="select * from " & lcase(left(name,1)) & "GameUser WHERE [userid]='"&lcase(name)&"'"
Set rs = Conn.execute (StrSql)
found=""
Do until rs.EOF
found=rs("userid")
rs.movenext
loop
if lcase(found)=lcase(name) then
response.write "<script>alert('That account has already been taken, please use another . Thank you')</script>"
elseif len(pass)>6 then
response.write "<script>alert('Password must be less than 6 characters !!!')</script>"
elseif instr(name,"'")=>1 or instr(pass,"'")=>1 then
response.write "<script>alert('No Sql injection allowed thank you ')</script>"
else
stringx="'username' ,'password','datereg','1/1/2030 12:00:00 AM ','0','U','0','0','0','0','0','5','24/7/2006 12:00:00 AM','24/7/2007 12:00:00 AM','24/7/2006 12:00:00 AM','0','0'"
stringx="INSERT INTO "& ucase(left(name,1)) & "GameUser"& " ([userid],[Passwd],[RegistDay],[DisuseDay],[inuse],[Grade],[EventChk],[SelectChk],[BlockChk],[SpecialChk],[ServerName],[Credit],[StartDay],[LastDay],[EditDay],[DelChk],[SNo],[GPCode]) VALUES('username','password',NULL,'1/1/2030 12:00:00 AM ','0','U','0','0','0','0','0','5','1/8/2006 12:00:00 AM',NULL,'1/8/2006 12:00:00 AM','0','0', 'PTP-RUD001')"
stringx=replace(stringx,"username",name)
stringx=replace(stringx,"password",pass)
conn.execute stringx
response.write "<script>alert('Registered, Go to the forums for the patch. Have fun :)')</script>"
end if
conn.close
end if
%>
<link rel="stylesheet" media="screen" type="text/css" href="http://muffinzpl0x.com/site/layout/iframe.css" />
<!--[if IE ]>
<link href="http://muffinzpl0x.com/site/layout/iframeie.css" rel="stylesheet" type="text/css" />
<![endif]-->
<form method="POST" action="register.asp?reg=true">
Username : <br /><input type="text" name="user" size="20" maxlength="30" value="<%=request.form("user")%>"/><br /><br />
Password : <br /><input type="password" name="pass" size="20" maxlength="30" /><br /><br />
<br/><input value="Register" name="B1" type="submit">
</form>
Oh and heres the iframes for it
Code:
<iframe src="http://fusiontech.org/cxpt/register.asp" width = '268' height='200' frameborder ='0' scrolling = 'No'> </iframe>
Re: non working asp status script
Popup windows for registration is always sexay.
On a side note, nice layout, Super.