PHP library to correct the https state of a page