0

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?

Ray
  • 2,713
  • 3
  • 29
  • 61

1 Answers1

2

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.

Matt S
  • 14,976
  • 6
  • 57
  • 76
  • I think I found that somewhere before but didn't think it would be as robust as I would need. Thanks, works like a charm! – Ray Sep 20 '12 at 15:32