在没有会话PHP的页面上存储变量

I am working on some code that is for machine to machine communication with XML . The devices connecting will not support sessions. I need PHP variables that work across pages with no session support.

I have used in a few places

file_put_contents($file,$content)

This works but this is going to make a lot of disk reads and writes when I am done

Furthermore reading the php manual for php://fd and php://temp I can not get this to work. https://php.net/manual/en/wrappers.php.php

I have tried this many ways and do not understand how it works . Also some of these methods are volitile meaning once they are read they are gone . I know once I read it as a variable I can re-write it back to php://temp or php://fd for later use on another page.

Maybe there is a better way to do what I need?

I am approching 10 disk accesses per page and it is certain to slow it all down. Each disk access has a single string about the length of a word, so writing and reading to/from disk seems crazy