
September 14th, 2004
10:49 AM
Neversidian
Status: Offline!
change the html for Primary and the domain, they both have the same html surrounding them
___________________
-Developer
-Forum Leader
-NeverNET

September 14th, 2004
11:04 AM
Neverside Newbie
Status: Offline!
Ah bummer! Unfortunately, the code is not on my site so I can't change it. Do you know of another way around it?
___________________
Best Regards,
John Saunders

September 14th, 2004
11:21 AM
Neversidian
Status: Offline!
$re = "/<tr>\r\n<td>\r\n<font face =' Arial,Verdana' size=1>\r\n (.+?) \r\n<\/td>/mis";
___________________
-Developer
-Forum Leader
-NeverNET

September 14th, 2004
11:25 AM
Neverside Newbie
Status: Offline!
Awesome! One last thing....can you tell me how to get them to display like:
domain.net
domain.org
domain.com
instead of
[0] => domain.net
[1] => domain.org
[2] => domain.com
Also, would it be possible to turn them into links as well? I REALLY appreciate the help. Been trying to figure this thing out for hours.
___________________
Best Regards,
John Saunders

September 14th, 2004
12:01 PM
thinking of something witty to put here
Status: Offline!
It's merely an array, so you can output them however you like:
<?php foreach ($result as $domain): ?>
<a href="http://<?php echo $domain; ?>/"><?php echo $domain; ?></a>
<?php endforeach; ?>

September 14th, 2004
12:07 PM
Neverside Newbie
Status: Offline!
I tried out your code and this is what it printed out:
<a href="http://Array/">Array</a>
Here's the updated code:
<?php
$buf = file_get_contents("list.html");
$re = "/<tr>\r\n<td>\r\n<font face =' Arial,Verdana' size=1>\r\n (.+?) \r\n<\/td>/mis";
preg_match_all($re, $buf, $result);
unset($result[0]);
?>
<?php foreach ($result as $domain): ?>
<a href="http://<?php echo $domain; ?>/"><?php echo $domain; ?></a>
<?php endforeach; ?>
Any idea what the problem is?
___________________
Best Regards,
John Saunders

September 15th, 2004
05:45 AM
Neversidian
Status: Offline!
<?php foreach ($result[1] as $domain): ?>
<a href="http://<?php echo $domain; ?>/"><?php echo $domain; ?></a>
<?php endforeach; ?>
___________________
-Developer
-Forum Leader
-NeverNET

September 15th, 2004
05:52 AM
Neverside Newbie
Status: Offline!
Thanks for all of your help!
___________________
Best Regards,
John Saunders