Skip to content

Instantly share code, notes, and snippets.

@ispyhumanfly
Created November 19, 2017 06:25
Show Gist options
  • Save ispyhumanfly/05b8c686a89a3ca7af3c9bd658029326 to your computer and use it in GitHub Desktop.
Save ispyhumanfly/05b8c686a89a3ca7af3c9bd658029326 to your computer and use it in GitHub Desktop.
#!/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";
@ispyhumanfly
Copy link
Author

This was the reminder that I needed of why I left PHP for Perl more than 10 years ago...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment