Searching script doing the same as froniuspost jsp

Hi!
I do using Froinus symo 8.2.3-6 with push service, which works great.
for 5min interval I push the inverter data with this url direct in the inverter push service:
/service/r2/froniuspost.jsp?sid=53545&key=xxxx&v6=Voltage_AC_Phase_1&dayenergy=1&n=1

my smartmeter:
/service/r2/froniuspost.jsp?sid=53545&key=xxxxxxx&v6=Voltage_AC_Phase_1&nodayenergy=1&n=1

i am soon getting a Fronius Gen24 without push service.
therefore I tried several scripts (PHP Files)
the last:

but the problem is a wrong consumption and import column in pvoutput. the rest is ok.
is this because of dayenergy=1 (inverter) and nodayenergery=1 (smart-meter) ?

So is there any chance to get a possible functional php script that does exactly the same as the fronius push?

Thanks a lot.
Klaus