$string = '4950501024015149';
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n");
$result = socket_connect($socket, $host, $port) or die("Could not connect to server\n");
socket_write($socket, bin2hex($string), strlen(bin2hex($string))) or die("Could not send data to server\n");
socket_close($socket);