I’m trying to create a custom session ID generator. From what I’ve read across the sites you can do this by manually editing PHP’s settings files, however, it will not be available until I switch from my shared servers to a fully customisable one.
What i’m trying to ask is whether it’s possible to specify how session IDs are generated by inputting a PHP code to a page? My intention is to use the same mechanics as the default ID generator, but use sha512 and a few custom goodies such as salt.
If you pass a string to the
session_id()function before callingsession_start(), you can set the session ID yourself. For example: