I have php scripts to migrate data from one database do another. In one script I call one another to Get the data from the original database, and then it sends it to another. Something like this:
migrateData.php <---> getData.php and then migrateData.php <---> putData.php
In putData.php im using $_GET, but when its too many Data I get the error saying "The length of the requested URL exceeds the capacity limit of this server". I've seen people saying to use $_POST, but i'm not really sure about it. My migrateData.php:
<?php
echo "Migration";
$url = "http://localhost/mig/getData.php";
$client = curl_init($url);
curl_setopt($client,CURLOPT_RETURNTRANSFER,true);
$response = curl_exec($client);
echo "<br>";
echo "<br>";
echo $response;
$url = "http://localhost/mig/putData.php?data=".$response;
$url = str_replace ( ' ', '%20', $url);
$client = curl_init($url);
curl_setopt($client,CURLOPT_RETURNTRANSFER,true);
$response = curl_exec($client);
echo $response;
?>
Any help would be appreciated