require( "facepunch" )

local serfile = io.open("cmcc_login_info_lua", "r")
ser=serfile:read()
-- print(ser)
serfile:close()

logout_data_post=string.sub(ser,string.len("http://221.176.1.140:80/user_status.php?")+1,string.len(ser)).."&logouttype=TYPESUBMIT"
print(logout_data_post)

local cookiefile = io.open("cmcc_login_cookie_lua", "r")
cookie=cookiefile:read()
cookiefile:close()

logout_url='http://221.176.1.140/do_logout.php'
r,c,cookie=facepunch.http.post(logout_url,cookie,logout_data_post)
print (r.."\n"..c)
print ("\n"..cookie)