Poslanie udajov na IP (tlac stitkov)

From: Vavrinec, Karol (Karol.Vavrinec@eu.sony.com)
Date: 19. 03. 2003, 17:04 CET

  • Next message: Jan Waleczek: "pamě»"
    Ahoj,
    
    potreboval by som poradit, ale neviem, ci sa mi podari dobre popisat, o co
    vlastne ide. Takze:
    
    V praci mame tlaciaren na stitky. Mame urobenu aplikaciu (v MySQL) a
    zadavame do nej data cez PHP. Na tuto tlaciaren sa da tlacit (podla mojich
    informacii a tak ako som to pochopil) len tak, ze sa na IP adresu (tlaciaren
    ma print server) poslu data. Aplikacia a tlac funguje, ale potrebujem to
    prerobit do MS Access, ale neviem, ako mam urobit tu tlac (t.j. nejake makro
    vo Visual Basicu). Nevie mi niekto poradit?
    
    Vzor dat, ktore idu na tlaciaren:
    
    {D0600,1000,0600|}
    {AX;+000,+000,+00|}
    {AY;+00,0|}
    {T00C42|}
    {C|}
    {XB00;0200,0107,3,3,05,05,13,13,05,0,0100,+0000000000,1,00|}
    {RB00;C9778010|}
    {PC000;0349,0078,10,10,R,00,B|}
    {RC000;SCPH-7502 C T2|}
    {PC001;0268,0333,10,10,R,00,B|}
      .
      .
      .
    
    Ako som spominal, je to robene cez PHP. Tu je zase vzor toho PHP ak to
    niekomu pomoze (mne nie ;-)):
    
    $output = "{D0555,0900,0500|}";
    $output .= "\n\r";
    $output .= "{AX;-000,+030,+00|}";
    $output .= "\n\r";
    $output .= "{AY;+00,0|}";
    $output .= "\n\r";
    $output .= "{C|}";
      .
      .
      .
    
    error_reporting (E_ALL);
    
    /* Get the port for the WWW service. */
    $service_port = "9100";
    
    /* Get the IP address for the target host. */
    $address = "43.215.33.28";
    
    
    /* Create a TCP/IP socket. */
    $socket = socket_create (AF_INET, SOCK_STREAM, 0);
    if ($socket < 0) {
      .
      .
      .
    
    Diky.
    
    Karol
    
    
    **********************************************************************************************
    The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies. Sony email is for business use only. 
    
    This email and any response may be monitored by Sony United Kingdom Limited.
    (05)
    **********************************************************************************************
    

  • Next message: Jan Waleczek: "pamě»"

    This archive was generated by hypermail 2.1.6 : 19. 03. 2003, 17:04 CET