If I kept searching I probably would eventually find my answer but I'm running out of time. I need to grab the link and the link text from an href.
IE:
Code: Select all
<a href="http://www.elverta.k12.ca.us/home/" target="content">Elverta Joint Elementary School District</a><br />Here's my test code:
Code: Select all
$handle = fopen("./yololinks.txt", "r");
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
list($link) = $data;
preg_match("/^(<a href="http:\/\/)?(ї^\/]+)/i", $link, $matches);
$host = $matchesї2];
print "$host<p>\n";
}
fclose($handle);Thanks!
- dstefani