Ps3 stays on for about 8 seconds then turns off. Help?

Push the power button its on for about 8 seconds(beeps a few times too) then goes off. Any idea why?

No, I watched it the entire time no light other than red and green.  Its one of the old fat ones if it helps.

you need a reflow. Try a repaste and check if the fan spins. may be your psu

Does it do the same thing when you turn it off from the menu?

My advice is throw it away and build a PC, and maybe look up PS3 oven fix on youtube

Like replace the thermal paste on the cpu/gpu?

Wont get that far.

I have a pc, the ps3 is a friend's.

My PS3 did something similar. I bought it off a friend broken thinking it had the YLOD.  The console would turn on, then shut off after like 10 seconds. To fix it I downloaded an system update from the Playstation website and loaded it onto a flash drive. Then I booted my PS3 into the maintenance menu and did a manual update. Worked fine after that.

That sounds like this. I must ask how exactly did he do that? I know nothing of ps3s.

Try to hold the disk button for a bit, that should fire up a cleaning program where the fans go top speed for around 2 min. If that won't happen i'd say psu failure. 

The one that opens the optical drive or the disk shaped power button? I know I sound like a noob but I've never touched a ps3 before. 

Stop bringing unhelpful, fanboyism advice, please.