I am looking for a way to save variables in a csv file. Here is an example of what has been achieved:
$enlace="http://php.net/manual/es/function.fgetcsv.php";
$Z = md5($enlace);
$A = substr($Z,0,2); //Obtenemos los primeros 2 caracteres del hash
$B = substr($Z,16,2); //Obtenemos 2 caracteres a partir del caracter 16
$C = substr($Z,30,2); //Obtenemos 2 caracteres a partir del caracter 30
$D = substr($Z,23,1); //Obtenemos 1 caractere a partir del caracter 23
$name = $A.$B.$C.$D; //Juntamos todo
$f = fopen("demosaved.csv", "a");
fputcsv($f, array($name, $enlace));
fclose($f);
I explain the variable $ link is not the same when I update the page but sometimes it repeats and ends up saving although it is repeated.
What I'm looking for is some way to compare the contents of the csv and if the variable $ name and $ link is found inside the csv file, do not save the columns Thanks