|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
php sockets, HELP -fsockopen
Ok, how would i connec to telnet using PHP with fsockopen, and then execute commands on telnet and get the returned data back....
I've tried to use socket_create but its not enabled on my php build so i dont wanna mess with it. I've tried to use some examples on php.net but they'll only return the first line of whats displays (im connecting to teamspeaks telnet, so it returns [TS]) then a line break, and then thats it... i wont execute any of the commands i put in... hers what ive tried... This is an example ive used from PHP.net's website ( http://www.php.net/manual/en/function.fsockopen.php ) PHP Code:
Code:
[TS]
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net. Free Teamspeak servers: http://gamersnetwork.us/ |
#3
|
||
|
the libraries for those functions arent installed ( dont know if my post made that clear or not )... thanks though... i tried using the socket_create() but it gave a Fatal error saying it was an undefined function.
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net. Free Teamspeak servers: http://gamersnetwork.us/ |
#4
|
||
|
Check your PM please.
|
#5
|
||
|
Thanks ill try there later tonight, i was hopin P might know... he seems to be able to figure out all my problems lol....
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net. Free Teamspeak servers: http://gamersnetwork.us/ |
#6
|
|||
|
Quote:
Let me know whatever comes out. I need to get that thing too. |
#7
|
||
|
I would suggest that you take a look at the source code for the Teamspeak Block for php-nuke and see how they did it (which is how I often figure out how to do stuff)
I just checked the source code and they used fsockopen() too. Here is how they got the player list, after all the connections have been made (note, $this refers to a class that is handling all the telnet work): PHP Code:
IcI |
#8
|
||
|
I think im gonna try a different class... i think i was doing something wrong which was why it wasnt working... i'll just ask on the team speak forums
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net. Free Teamspeak servers: http://gamersnetwork.us/ |
#10
|
||
|
Hehe i figured it out on my own! The first thing I had was working fine, but the carriage return wasnt entering the information so it wasnt entering it had to use \n to get it to act as a 'enter' Everythings working good
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net. Free Teamspeak servers: http://gamersnetwork.us/ |
#11
|
|||
|
Quote:
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DFX2 Error trying to activate: NETWORK SOCKETS blocked | high_low_jack | Tech Support | 14 | 12-27-2009 02:50 PM |
FSockOpen & SSH | BeBop | Web design and Programming | 5 | 02-03-2006 10:53 PM |
Php Help!! | navysea| | Web design and Programming | 3 | 03-04-2005 06:27 PM |
PHP-NUKE and PHP | ~BLÃÐE~ | phphq.Net Forums | 9 | 01-19-2005 06:49 AM |
Need Help Using PHP | .DareDevil. | Web design and Programming | 15 | 08-11-2004 01:04 AM |