Created
November 19, 2017 06:25
-
-
Save ispyhumanfly/05b8c686a89a3ca7af3c9bd658029326 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
require './simple_html_dom.php'; | |
/* Bleu Libellue */ | |
$html = file_get_html('https://www.bleulibellule.com/'); | |
/* Categories */ | |
echo "\nCOIFFURE\n"; | |
foreach($html->find('a') as $link) | |
if (preg_match("/coiffure/i", $link->href)) | |
echo "\t$link->href\n"; | |
echo "\nESTHÉTIQUE\n"; | |
foreach($html->find('a') as $link) | |
if (preg_match("/esthetique/i", $link->href)) | |
echo "\t$link->href\n"; | |
echo "\nELECTROBEAUTÉ\n"; | |
foreach($html->find('a') as $link) | |
if (preg_match("/electrobeaute/i", $link->href)) | |
echo "\t$link->href\n"; | |
echo "\nMATÉRIAL PRO\n"; | |
foreach($html->find('a') as $link) | |
if (preg_match("/materiel-professionnel/i", $link->href)) | |
echo "\t$link->href\n"; | |
echo "\nACCESSOIRES CHEVEUX\n"; | |
foreach($html->find('a') as $link) | |
if (preg_match("/accessoires-cheveux/i", $link->href)) | |
echo "\t$link->href\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was the reminder that I needed of why I left PHP for Perl more than 10 years ago...