You have a couple of options.
1. buy a cheap DAQ card. You can pick up cheap cards for under $100
or even try to make your own. (www.labjack.com for cheap USB cards)
2. You can make your own digital output port. You can use the
parallel port as a 8 pin digital output. It will be kind of slow,
giving pulses in the 10-20 mSec range at the fastest, but I have seen
it work. You can also use the serial port Tx pin as a output, but
some people have had problems with it, because the computer may not
like to hold it steady in one state.
The ports from your computer are RS-232 levels, meaning they are -12v
to +12v, so if you use them on a 0v to 5v TTL signal, you need to
convert them. There are lots of level converter chips out there for
that (MAX-232 for exampl
e)