Pulling Links from the CITW185 index page.

Please read THIS for additional information.

examples.php : Examples
http://www.php.net/ : The Official PHP Site
http://www.w3schools.com/PHP/DEfaULT.asP : W3Schools PHP Tutorial
http://www.htmlcodetutorial.com/ : HTML Code Tutorial
http://www.w3schools.com/html/default.asp : W3Schools HTML Tutorial
http://w3schools.com/css/ : W3Schools CSS Tutorial
https://www.w3schools.com/sql/ : W3Schools MySQL Tutorial
mailto:http://www.jetbrains.com/phpstorm/ : PhpStorm Email
http://www.jetbrains.com/phpstorm/ : PhpStorm - JetBrains
https://lccedu.webex.com/meet/tedd : WebEx ORT (Online Real Time) TR 3:10PM-5:00PM
http://www.amazon.com/Beginning-PHP-5-3-Wrox-Programmer/dp/0470413964/ref=sr_1_1?ie=UTF8&s=books&qid=1303926918&sr=1-1 : Picture of Beginning PHP 5.3 Programming Book
brace-styles.php : Brace Styles
bad-coding.php : Bad Coding
doctypes.php : DOCTYPES
https://blog.html.it/layoutgala/index.html : CSS Layouts
http://css.maxdesign.com.au/listamatic/ : Listamatic (Menus)
http://htmlcolorcodes.com/color-chart/ : Online Color Chart
http://colorschemedesigner.com/ : Color Scheme Designer
http://www.degraeve.com/color-palette/ : Colors from a Picture
http://www.html5accessibility.com : HTML5
http://htmlpurifier.org/docs/enduser-utf8.html : UTF8
https://stuffandnonsense.co.uk/projects/contract-killer/ : Open-Sourse Contract
http://www.bluehost.com/ : Blue Host
http://www.godaddy.com/ : Go Daddy Host
https://websitesetup.org/php-cheat-sheet/ : PHP Cheat Sheet (Please read -- this will help you!)
http://validator.w3.org/check?uri=referer : Valid HTML 4.01 Strict
http://jigsaw.w3.org/css-validator/check/referer : Valid CSS!

 

CODE FOLLOWS

<?php
    
include('includes/header.php');    
?>     

    <h1>
         Pulling Links from the CITW185 index page.
    </h1>
    
    <p>
        Please read <a href="../parse-links-article.php">THIS</a> for additional information.
    </p>
    
<?php 


    $url 
'http://citw.lcc.edu/~sperlt/citw185/index.php';
        
    
$input file_get_contents($url);

    
// NOTE the regular Expression below (Please read about this patern in the THIS page above )

    
$regexp "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>";

    if(
preg_match_all("/$regexp/siU"$input$matchesPREG_SET_ORDER))
        {
        echo(
'<p>');
        foreach(
$matches as $match)
            {
            if (
$match[0] == "<a href=\"#\"></a>")
                {
                break;
                }
            
// $match[0] = link with anchor (i.e., <a href="index.php">Home</a>)
            // $match[1] = "
            
echo("$match[2] : $match[3] <br>");
            }
        echo(
'</p>');
        }
    
    include(
'includes/footer.php');    
?>