*** is what i'm using. didn't make it myself, just something i found and using it for now. just execute them both.Give me that script php to fool policy schema
It's just from the internet, and the one i use is a piece of shit but it works for now, only playing around atm anyway xDFrom the internet or from ox server? Because mine policy script's work good.
Unfortunatly i can't be of much help here since mine doesn't want to connect at all for some reason.use my files, the are reaching login protocol of server. use port 7171!!!!!
port 7172 times out and a default message from tibia.swf will be displayed on port 7171 protocollogin.cpp will answer that their is no account name :O
Could be 2 reasons why it bounces.
Code:std::string sessionKey = msg.getString(); size_t pos = sessionKey.find('\n'); if (pos == std::string::npos) { dispatchDisconnectClient("You must enter your account name."); return; } std::string accountName = sessionKey.substr(0, pos); if (accountName.empty()) { dispatchDisconnectClient("You must enter your account name."); return; }
you run it via commandline, just execute:I'm uploading my setup with my files etc. I can't get what you have get Mokerhamer
Always "Could not connect to this player cast.".
Can you explain how to run that php script?
php socket.php
php socket.php &
Only if you teach us how to get this farOke i've edited the source to see where it exactly fails. Turns out it's the session key.
added this to protocolgame.cpp
Just to be clear you only have the OX tibia.swf? and not the launch page? (want to see how the query their play.php)
1. place the trusted.xml in same folder as the php script that needs it. (place crossdomain.xml in head folder)
2. I use a debian server :S i just launch it through terminal.(php policy-server.php) Dosen't Xampp have an console?
To be honest, i only wish to share Flash client with people who contribute. I'll be maiking a privet Github project soon. i will add u 2 since you are helping
//Maiking it tomorrow ill upload all files that i have so far.(i made so many debugging scripts, need to check wich one are usefull )
It it closes dirreclty then the xml files are wrong. i have a debugger for it but hard to explain..
Use this script and let flash connect to it on port 7072.
Code:#!/usr/bin/php <?php error_reporting(1); ini_set('display_errors', 1); // Create $socketlogin = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); if ($socketlogin === false) { echo "socket_create() Failed, reason: " . socket_strerror(socket_last_error()) . "\n"; } // Bind if (socket_bind($socketlogin, "0.0.0.0", 7072) === false) { echo "socket_bind() Failed, reason: " . socket_strerror(socket_last_error($socketlogin)) . "\n"; } // Listen if (socket_listen($socketlogin, 90) === false) { echo "socket_listen() Failed, reason: " . socket_strerror(socket_last_error($socketlogin)) . "\n"; } // Accept and loop through results: while($clientlogin = socket_accept($socketlogin)) { //display information about the client who is connected if(socket_getpeername($clientlogin, $address, $port)) { echo "\n\n\nClient $address : $port connected.\n"; } //Now receive reply from server if(socket_recv( $clientlogin , $buf , 2045000 , MSG_WAITALL ) !== FALSE) { echo "\n[Flash Client] Request $buf"; } socket_close($clientlogin); } socket_close($socketlogin); ?>
If you get on console this "[Flash Client] Request" then your xml files are good!
if you get this in console "[Flash Client] Request <policy-file-request/>" Your crossdomain.xml is not working properly!
*With console i mean the console where you launched the php scripts in!
//Going to bed in a few minutes...
Client 192.168.1.3 : 6496 connected.
Ah.. yeah i got the policy request, but i got everything set up properly... i thinkOke now F5 the flash client it should give you the reequest answer