'; $html .= ''; $html .= ' Annonces recontres sexe http://www.libertinefrance.com/ annonces rencontres sexe fr-fr'; //recup données $db = mysql_connect('localhost', 'libertinefrance', '72lib#33') or die('Erreur de connexion '.mysql_error()); mysql_select_db('libertinefrance',$db) or die('Erreur de selection '.mysql_error()); $sql = "select * from lib_profil order by id DESC limit 0,100"; $res = mysql_query($sql) or die('Erreur SQL !
'.$sql.'
'.mysql_error());; while ($data=mysql_fetch_array($res)){ $pseudo = $data['pseudo']; $profil = stripslashes($data['profil']); $rep1 = "&"; $rep2 = "et"; $profil = str_replace($rep1,$rep2,$profil); $type = $data['type']; $genre = $data['genre']; $age = $data['age']; $depart = $data['departement']; $ville = $data['ville']; $replace = array(" ","é","è","ê","à","ô","ç","â"); $replaced = array("_","e","e","e","a","o","c","a"); if($depart != ""){ $provenance = str_replace($replace,$replaced,$depart); $provenance = "departement-".$provenance; } else{ $provenance = str_replace($replace,$replaced,$ville); $provenance = "ville-".$provenance; } if(ereg("Armor",$depart)){ $provenance = "Cotes_Armor"; } if(ereg("Or",$depart) and $depart != "Pyrénées Orientales" and $depart != "Orléans"){ $provenance = "Cote_Or"; } $url = 'http://www.libertinefrance.com/rencontres-'.$provenance.'.html'; $html .= ' annonce rencontre : '.$pseudo.' - '.$depart.' - '.$age.' ans '.$url.' '.$profil.' '; } $html .= '
'; print $html; ?>