Você tem que analisar o texto, procurando o caractere "enter":
<?php
if(isset($_POST['url'])){
if(strpos($_POST['url'], "\n")){
$entries = explode("\n", $_POST['url']);
} else {
$entries = array($_POST['url']);
}
// connect to DB here
// then iterate over entries
foreach($entries as $e){
// build some type of Prepared Statement to protect from SQL Injection
$q = "INSERT INTO table (col1) VALUES (?)";
// bind $e to statements
// Execute SQL statements
}
// close DB connection
}
?>