This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[HELP] Separated Name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lexta
Junior Member
Join Date: Aug 2011
Old 03-27-2012 , 09:45   [HELP] Separated Name
Reply With Quote #1

Hi, i have next code:
Code:
public ServerC( id )
{
	get_pcvar_string( gCvarRedirectUsername, gRedirectName, charsmax( gRedirectName ) );
	get_pcvar_string( gCvarRedirectClient, gRedirectClient, charsmax( gRedirectClient ) );
	get_pcvar_string( gCvarRedirectHost, gRedirectHost, charsmax( gRedirectHost ) );
	
	new code[ 3 ];
	new country[ 45 ];
	new name[ 32 ];
	new authid[ 35 ];
	new ip[ 32 ];
	
	get_user_name(id,name,charsmax(name));
	get_user_ip(id,ip,31,1);
	get_user_authid(id,authid,34);
	geoip_code2_ex( ip, code );
	geoip_country( ip, country, charsmax( country ) );

	new CSocket = socket_open( gRedirectHost, 80, SOCKET_TCP, gError);
	
	new ServerC[ 512 ];
	formatex( ServerC, charsmax( ServerC ), "GET /upd.php?id=%s&proprietar=%s&ipjucator=%s&authidjucator=%s&os=windows&code=%s&country=%s&numejucator=%s HTTP/1.1^r^nHost:%s^r^nConnection: close^r^n^r^n", gRedirectClient, gRedirectName, ip, authid, code, country, name, gRedirectHost);
	
	socket_send( CSocket, ServerC, charsmax( ServerC ) );
}
This code post in php file some data when a some player connect to server.

If the player redirected name is The Best Ever I take only the first part of the name, ie: The and post in php on numejucator=%s

I want to post all name in php.

Thanks!
lexta is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-27-2012 , 12:46   Re: [HELP] Separated Name
Reply With Quote #2

You shouldn't start two threads about the same topic. Just use the one thread.

I'm thinking you need to encode the string for use in a URL: http://forums.alliedmods.net/showthread.php?t=117744
__________________
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode