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?
Asked
Active
Viewed 417 times
0

Ray
- 2,713
- 3
- 29
- 61
-
Check out [cURL](http://php.net/manual/en/book.curl.php) – Travesty3 Sep 20 '12 at 15:16
-
1it would be far better to get the json functions available on your server. this seems like a less than ideal solution. – Tim G Sep 20 '12 at 15:17
-
I've looked into it but PECL seems to strenuous to set up. – Ray Sep 20 '12 at 15:24
1 Answers
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