The online racing simulator
PHPInSim
(96 posts, started )
So I'm done with the packets and defines, they are now in a PHP friendly format. Now to make it parse. I'm going to upload this version as it's a milestone, buT that's about it. And I'll do that when I get home, I don't have access to the Internet right now from my laptop and I'm using my iPhone to post this.
This version does not allow you to send packets, the packets it does send is to start, maintain and stop the connection.

Explore this please. But keep in mind, it does not parse any variable length packets (MCI, NPL), and it might have a problem with the vec data type. So far, I've been using it on a dedicated server, with ZERO clients. It maintains it's own connection from what I could see. More to come at a later date. Right now my cheeks are burning and that's not a good sign, must be coming down with something thing.
Attached files
PHPInSim 0.3.1.zip - 11.2 KB - 386 views
Hi Dygear!

I'm testing with PHPInSim, and I don't know so much about InSim. I have tried to put your example for sending a welcome message in PHPInSim, but don't sends the welcome message.

I put the function call to the message like this, its correctly?



<?php 
php
$InSim 
= new client_connect();
?>

Quote from revolucio :Hi Dygear!

I'm testing with PHPInSim, and I don't know so much about InSim. I have tried to put your example for sending a welcome message in PHPInSim, but don't sends the welcome message.

I put the function call to the message like this, its correctly?



<?php 
php
$InSim 
= new client_connect();
?>


As of this version, it does not allow to send any packets besides the ones to maintain connection to the server. The issue with that would be that you can't do anything with it.

I'm right now working on some iPhone projects and thus do not have very much time for this. So if some one feels like continuing development without me, by all means, go ahead.
Hi Dygear, I posted earlier with regards to PHPInSim, and I noticed you have released an update! I downloaded it and looked at it and it seems very good. I can see the packets being sent out from LFS and written to the console.log file.

What I am wanting to do now, is after a race is finish, I want to grab the results from the grid. I see this being sent to console.log.

I have no idea on how I would go about reading this packet and then be able to manipulate the data so I can enter it into the database.

I understand you are busy, and if you have some time to get me started or provide me the right direction on how to start this I should be able to work from there. I am not sure basically where and how to start from reading your code.

I would greatly appreciate your help - if you can.
Quote from Dygear :As of this version, it does not allow to send any packets besides the ones to maintain connection to the server. The issue with that would be that you can't do anything with it.

I'm right now working on some iPhone projects and thus do not have very much time for this. So if some one feels like continuing development without me, by all means, go ahead.

Oh, and you or anyone is going to continue development?

Couldn't you take some time to do that this could send packets?

PHP rocks
*Looks in the direction of filur*

Listen socket created!
Warning: socket_bind() [function.socket-bind]: unable to bind address [99]: Cannot assign requested address in /var/www/lfs/main.php on line 26
Could not bind to listen socket, address or port!
Warning: socket_write() expects parameter 1 to be resource, null given in /var/www/lfs/main.php on line 50

What is bad?
Quote from misiek08 :

Listen socket created!
Warning: socket_bind() [function.socket-bind]: unable to bind address [99]: Cannot assign requested address in /var/www/lfs/main.php on line 26
Could not bind to listen socket, address or port!
Warning: socket_write() expects parameter 1 to be resource, null given in /var/www/lfs/main.php on line 50

What is bad?

My guess is, there is something wrong with the socket bind function. The function is present, but it's not able to bind to that IP address. So make sure you don't have like an apache server running or anything like that, or for that matter anything working on the port setup in the file, and I think that's 29999.
My server is located at 153.19.129.162 on port 30014 (it's provider's ip & port)
I'm running this script from my VPS located at other ip than LFS Server
I'll look into it.
Quote from misiek08 :

Listen socket created!
Warning: socket_bind() [function.socket-bind]: unable to bind address [99]: Cannot assign requested address in /var/www/lfs/main.php on line 26
Could not bind to listen socket, address or port!
Warning: socket_write() expects parameter 1 to be resource, null given in /var/www/lfs/main.php on line 50

What is bad?

Looks like bad PHP configuration, try to uncomment line "extension=php_sockets.dll" in php.ini file. Works for me.
PHPInSim 0.3.5
Proper support for MCI, NLP & CPP.

Still no plugins.
Still does not send packets.

Plugins are next on the hit list. When this happens is entirely up to me. Might be in a week, might be in a year. I would bet it's going to be closer to a year.
Attached files
PHPInSim 0.3.5.zip - 11.9 KB - 337 views
You might wanna get on Gobby, I don't have time right now but there's enough on there to keep you busy reading anyway
It's an old PHP based InSim project of mine, fully functional, take whatever you need
Quote from morpha :You might wanna get on Gobby, I don't have time right now but there's enough on there to keep you busy reading anyway
It's an old PHP based InSim project of mine, fully functional, take whatever you need

Lol, 10-4 mate. I'll look over some of the code . I'm quite happy with what I just did, while I'm not really that happy at the same time. And god damn, I have work in 20 minutes. Ahh!
[06:28:36] <Dygear> I'll update your constants.php file with my file.
[06:29:05] <Dygear> I have a very update to date packet definition ... but I'm pretty sure that there has been no change in the Z level patches.
[06:30:22] <Dygear> Damn, your code is so much cleaner then mine.
[06:30:37] <Dygear> It's like looking at AMX Mod and then looking at AMX Mod X'es code.
[06:30:51] <Dygear> AMX Mod was very dirty, where as AMX Mod X was nice and clean.
[06:34:30] <Dygear> I added mine in the comment of constants.php, if you would like to review and edit as needed.
[06:35:28] <Dygear> Yeah, your packet parser looks to be WAY better then mine.
[06:35:49] <Dygear> And, at one point, I was very proud of the code I had made ... :) lol.

Like I said, your packet parser is just freaking awesome. I'm going to have to do a rewrite of my engine ... .

[edit]Son of a bitch! He wrote his own TCP socket driver also ...[/edit]
I'm using PHPLFS and it's working good but I have one trouble. Script stops after 4h of empty server.
Quote from misiek08 :I'm using PHPLFS and it's working good but I have one trouble. Script stops after 4h of empty server.

Well, this is not the PHPLFS thread. I have no idea how there code base works.
The death of PHPInSim and the Birth of InSim Mod.
Just so everyone knows, this project is kinda dead. Thanks to morpha he gave me his code that he make like a year a go, and handed it over to me. So with it I'm going to reconstruct this, but as it does not feel right to continue this project under this name as it's no longer my code base, and because it seems to conflict with the PHPLFS project I'm making a new project.

InSim Mod is it's name. I've talked to BAILOPAN, who is one of the main devs for AMX Mod X & Source Mod, over on the AlliedModders Forum and he is willing to allow this project to go under their banner, as it's pretty much going to use the same syntax as AMX Mod X for it's forwards and natives (on both the PHP & C++ side). That's about all the news I have right now. I'll be handing out alpha builds in the next week or so to the community programmers with a strong background in PHP and hope they adopt the project for their own servers and it should gain some support from within, and hopefuly have some pretty kick ass plugins to start off with.

morpha, filur, Krammeh, detail & NotAnIllusion, your all getting it whether you want it or not

Calling all PHP programmers! I've got some toys for you, PM me for some code!
verb-entity-attribute is a lock for the syntax of the commands. Just wanted to let you all know .
Officially Depreciated. This thread can be locked.

PHPInSim
(96 posts, started )
FGED GREDG RDFGDR GSFDG