PHP код:
format ( szTranslate , sizeof ( szTranslate ) , URL , szTranslateStartEng , szTranslateEndEng , szTranslateText ) ;
HTTP ( playerid , HTTP_GET , szTranslate , "" , "BufferTextTranslate" ) ;
printf ( "%s" , szTranslate ) ;
public BufferTextTranslate ( index , response_code , data [ ] ) {
if ( response_code == 200 ) {
new
szBuffer [ 128 ]
;
format ( szBuffer , sizeof ( szBuffer ) , ""#TEXT_TRANSLATE_SUCCESS": %s" , data ) ;
SendClientMessage ( index , -1 , szBuffer ) ;
} else {
SendClientMessage ( index , -1 , #TEXT_TRANSLATE_FAIL ) ;
printf ( "ERROR: %d" , response_code ) ;
}
}