Recording music from the same computer

Can I use Audicity to record from the earphone out of the same computer. I like to record audio from a online broadcast channel. I started the online broadcast under internet explorer (IE). I can hear the sound from my head set. I started Audicity . I unplug my head set and use a audio cable (standard 3.5mm stereo cable) to connect the earphone out to the microphone input. I can see Audio signals on the audicity screen. I started recording for a minute and played back. The sound quality is really bad. Can I do it this way ? What I want is to record a radio broadcast on an online internet radio while I am at work.
I have not figured out how to do it yet. But I think I can automate the startup of both IE and Audicity to start and stop at the time I want. If my IE home page is the uRL of the online radio, It may start broadcasting when IE starts. I assume that I can schedule Audicity to start recording at set time.

see here: http://wiki.audacityteam.org/wiki/Mixer_Toolbar_Issues#Using_the_Control_Panel