I'm a bit late to answer this question, but just in case...
I'm not 100% sure to understand your workflow, but basically, to dial USSD codes like *556#
you need to be connected on the mobile network with a mobile device (like a usb modem) and a valid SIM card. USSD implementation in modems is, by my experience, quite partial: personally I'd used Huawei 180E modems but you may want to search the internet to find more recent references that implement USSD properly.
For how to discuss with a mobile device, you might want to read this SO question/answer. Basically, your PHP code will open a serial connection on the modem, send some AT commands and wait for responses.
I don't know your objectives, but obviously, it's one concurrent session of several seconds per modem, so this is not the right solution for a usage that requires even just one query per second. If this is the case, either your telco exposes some appropriate API you may query from outside or you may negotiate a direct integration with its platforms. In both cases, it won't be for free...