'Hangover' Director TEN YEARS of Protection From Crazed 1-Night Stand

5/4/2013 4:00 AM PDT

'Hangover' Director Todd Phillips -- TEN YEARS of Protection from Obsessed 1-Night Stand

Todd Phillips' "Fatal Attraction" nightmare is finally over -- TMZ has learned, the one-night stand who allegedly stalked the "Hangover" director has been ordered to stay away ... FOR TEN YEARS!

TMZ broke the story ... 22-year-old Juliana Shiao was arrested outside Todd's L.A. home in January. Todd later obtained a temporary restraining order against the woman, claiming she was a one-night stand who went Glenn Close on his ass ... stalking him all over the place and making his life hell.

Juliana was charged with felony stalking and pled no contest earlier this week.

In addition to the 10-year 100-yard stay away order, Juliana was also ordered to complete 30 days of community service as well as a 1-year psych program.

Still a happier ending than "Fatal Attraction."