My friend's iPhone's sleep/wake button no longer works. Is there any way to turn off the screen besides setting up auto-lock and waiting a few minutes?
It appears that if you go into Settings > General > Accessibility and enable Assistive Touch, a new transparent button appears on your iPhone. This button can be accessed all the time. It is overlayed over anything appearing on your phone. If you tap it, and then tap Device, one of the options is Lock Screen.
Instead of having the icon always be visible, you can go to the Triple-click Home setting under the Accessibility page and choose AssistiveTouch. This way you can easily show or hide the button with a triple-click of the home button!
Download and install the Find My iPhone app.
When you want to lock the screen, launch the app, find your own iPhone.
Remote Lock your own iPhone
ps - I never said it was an elegant solution :-) The OP asked "Is there any way" [emphasis added]. This works, I tested it myself.
if your phone is jailbroken, you can download and install activator which allows you to change any other buttons to the lock button. You can also set pressing the home button twice to lock or other finger gestures to lock too. Mine got jammed and I used the volume up button to lock because the assistive button is really painful to use I have to click 3-4 times before locking my phone.