- <?php
- if(isset($_POST['lien']))
- {
- $lien = $_POST['lien'];
-
- if (!$fp = fopen("$lien","r")) //lecture du fichier
- {
- echo "Echec lors de la connexion !";
- }
- else
- {
- $fp = fopen("$lien","r"); //ouveture du fichier
- $page ='';
- while (!feof($fp))
- { //on parcourt toutes les lignes
- $page .= fgets($fp, 4096); // lecture du contenu de la ligne
- }
-
- $fichier = stripslashes($page);
- $fichier = str_replace('/','',$fichier);
-
- if(preg_match("#meta#i", "$fichier"))
- {
- $arra = preg_replace('#<meta name="description" content="(.+)"[ >]#i', '&_\[$1\]&_', $fichier);
- $array = explode('&_', $arra);
- $nb = count(array_filter($array)); // Je compte mon array
- for ($numero = 0; $numero < $nb; $numero++) // boucle pour parcourir l'array
- {
- $numma = $array[$numero];
- $numm = str_replace(chr(91),'',stripslashes($numma)); //déclaration de la variable qui contient le lien
- $text = str_replace(chr(93),'',$numm);
-
- if(preg_match("#\[(.+)\]#i", "$array[$numero]"))
- {
-
- echo $text;
- }
-
- }
-
-
- }
- else
- {
- echo "pas de balise meta !";
- }
-
- }
-
- }
- else
- {
- ?>
- <form action = "b0t.php" method="post">
- Votre URL : <input type = "text" name = "lien"><br />
- <input type = "submit" value = "Envoyer">
- </form>
- <?php
- }
- ?>
<?php
if(isset($_POST['lien']))
{
$lien = $_POST['lien'];
if (!$fp = fopen("$lien","r")) //lecture du fichier
{
echo "Echec lors de la connexion !";
}
else
{
$fp = fopen("$lien","r"); //ouveture du fichier
$page ='';
while (!feof($fp))
{ //on parcourt toutes les lignes
$page .= fgets($fp, 4096); // lecture du contenu de la ligne
}
$fichier = stripslashes($page);
$fichier = str_replace('/','',$fichier);
if(preg_match("#meta#i", "$fichier"))
{
$arra = preg_replace('#<meta name="description" content="(.+)"[ >]#i', '&_\[$1\]&_', $fichier);
$array = explode('&_', $arra);
$nb = count(array_filter($array)); // Je compte mon array
for ($numero = 0; $numero < $nb; $numero++) // boucle pour parcourir l'array
{
$numma = $array[$numero];
$numm = str_replace(chr(91),'',stripslashes($numma)); //déclaration de la variable qui contient le lien
$text = str_replace(chr(93),'',$numm);
if(preg_match("#\[(.+)\]#i", "$array[$numero]"))
{
echo $text;
}
}
}
else
{
echo "pas de balise meta !";
}
}
}
else
{
?>
<form action = "b0t.php" method="post">
Votre URL : <input type = "text" name = "lien"><br />
<input type = "submit" value = "Envoyer">
</form>
<?php
}
?>