title: how can i get unique transaction id in PHP?
body: <p>I'm testing my log module written PHP.</p>
  <ol>
  <li>web-server occur too many transaction.</li>
  <li>every transaction writing on same file. (log.txt)</li>
  <li>how can i logging this transactions at same file with multiple lines?</li>
  </ol>
  <p>below log example.</p>
  <blockquote>
  <p>Dec 05 01:50:02  [info] REQ[1111111111111]: param=1</p>
  <p>Dec 05 01:50:02  [info] REQ[2222222222222]: param=2</p>
  <p>Dec 05 01:50:02  [info] RES[2222222222222]: res=20</p>
  <p>Dec 05 01:50:02  [info] RES[1111111111111]: res=10</p>
  </blockquote>
  <p>ok, i found a solution with uniqid().</p>
  <p><em>BUT</em> it based on timestamp, so it is not unique huge request on same time and same machine.</p>
  <p>PHP is NOT support THREAD.
  if other Language (as C,JAVA), best solution is using [thread id] each thread or process, i guess.</p>
  <p>any idea on PHP?</p>
  <p>sorry for poor english.</p>