_siikais_ Posted January 22, 2010 Report Share Posted January 22, 2010 taatad ir rindinja kuru vajag nolasiit ar sscanf 16:37:10 [user][char]AI[107,Manta ar atstarpem,0,0,0,1]serial:[31574236] dur:[65] Ex:[0,0,1,0,0,0,0] Set[0] 380:[0] HO:[0,0] bet ar shaadu format vinjsh nelasa kaa gribeetos list($tag1,$tag2,$tag3,$tag4,$tag5,$tag6,$tag7,$tag8,$tag9,$tag10)=sscanf($rinda, "%s [%s][%s]AI[%s]serial:[%s] dur:[%s] Ex:[%s] Set[%s] 380:[%s] HO:[%s]"); varbuut kaads var ieposteet pareizu format lai visas veertiibas kas ir [] iekavaas panjem kaa mainiigo paldies jau ieprieksh ;) Link to comment Share on other sites More sharing options...
2easy Posted January 22, 2010 Report Share Posted January 22, 2010 $s = '16:37:10 [user][char]AI[107,Manta ar atstarpem,0,0,0,1]serial:[31574236] dur:[65] Ex:[0,0,1,0,0,0,0] Set[0] 380:[0] HO:[0,0]'; list($tag1,$tag2,$tag3,$tag4,$tag5,$tag6,$tag7,$tag8,$tag9,$tag10)=sscanf($s, '%s [%[^]]][%[^]]]AI[%[^]]]serial:[%[^]]] dur:[%[^]]] Ex:[%[^]]] Set[%[^]]] 380:[%[^]]] HO:[%[^]]]'); Link to comment Share on other sites More sharing options...
_siikais_ Posted January 22, 2010 Author Report Share Posted January 22, 2010 tag1, tag2 un tag3 ar echo izvad aveertiibas, bet tag 4 un talaakie vairs neizvada neko ar echo paliidizibu Link to comment Share on other sites More sharing options...
2easy Posted January 23, 2010 Report Share Posted January 23, 2010 hmm, es pat notestēju arī uz otra servera (gan php4, gan php5). visur strādā. vismaz uz šiem datiem... Link to comment Share on other sites More sharing options...
_siikais_ Posted January 23, 2010 Author Report Share Posted January 23, 2010 (edited) paguleetas 5h sha choleesim ko vakar esmu palaidis garaam. p.s. editoshu postu ar rezultaatu p.s.s. shancee, nesaprotu kaapeec vakar negaaja ty un Topic Lock Edited January 23, 2010 by _siikais_ Link to comment Share on other sites More sharing options...
Recommended Posts