将没有表单的POST数据发送到另一台服务器

将没有表单的POST数据发送到另一台服务器

问题描述:

My server does not support json_encode or json_decode, I am wanting to send a 2D array to a different server using serialize(), then process it and print it a json encoded array. I'm afraid that the limitations of GET would not allow for longer arrays. How can I do this?

我的服务器不支持json_encode或json_decode,我想使用 serialize() code>,然后处理它并打印一个json编码的数组。 我担心GET的限制不允许更长的数组。 我该怎么做? p> div>

If you can't upgrade PHP to get the built-in JSON functions, use a PHP implementation of JSON encoding, such as this (found through a quick search; there may be better implementations).

Or use POST (through libcurl, as others have noted) if your GET parameters are long.