Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How much data can be sent via $_GET

Tags:

php

get

How much data can be sent via $_GET in PHP5? Is there a maximum number of variables, string length etc? Thanks in advance.

like image 527
BenTheDesigner Avatar asked May 20 '10 10:05

BenTheDesigner


People also ask

How much data can you send with GET request?

There is no defined limit, according to the RFC. If you are using a web browser for GET , then you are generally going to be limited to around 2K for the full URL. For POST , you are unlikely to hit a limit at any practical level.

How can I send big data request?

GET requests shouldn't exceed 1-4 kilobytes in size due to browser and server limitations. You would have to split your request in chunks to do this. If the data comes from a form, you could, for example utilize jQuery's . serialize() function to put the data into one string.

Can we pass data in GET method?

GET is an HTTP method for requesting data from the server. Requests using the HTTP GET method should only fetch data, cannot enclose data in the body of a GET message, and should not have any other effect on data on the server.


1 Answers

Although the specification of the HTTP protocol does not specify any maximum length, practical limits are imposed by web browser and server software.

like image 112
Stefan Gehrig Avatar answered Sep 27 '22 17:09

Stefan Gehrig