I'm slightly confused. The iPhone will charge when connected to any USB port that has power. That's the way the hardware works. A PC that's turned off does not supply power to its USB ports, so of course that's not going to work, and no software application running on the iPhone can change that.
For most computers the USB ports also have power supply, when the computer is turned off. That's why the optical sensor of ur mouse is still glowing, for example.
I heard it's because the charging current of the mainboard is too low to charge the iPhone in Standby.