View Single Post
Old 12-10-2004, 07:41 AM   #1
Zee
Green Mole
 
Join Date: Dec 2004
Posts: 1
Dynamic Link Bug with Short Tags (and solution)

Hey, just ran into this issue and thought I'd post it, as I couldn't find it listed anywhere else (although this thread looked like it might have been about the same issue). Please move it to the appropriate forum if this isn't the right place.

PHPDig seems to have a bit of difficulty crawling links that are dynamically generated using short tags.

For instance:
Code:
while ($moreRows) {
...
?>
<a href="my_page.php?ID=<?=$row[pageID]?>">link</a>
<? } ?>
will result in a link that the PHPDig spider does not seem to crawl.

If you ouptut it this way instead:
Code:
while ($moreRows) {
...
echo '<a href="my_page.php?ID=' . $row[pageID] . '">link</a>';
}
the PHPDig spider finds the link and indexes the linked page properly.

This was an issue for me, as I have a ton of dynamically generated links, and I tend to use short tags rather than echo. Normally, the server has no problem with short tags - it was only with PHPDig that I encountered it as an issue. I was using PHPDig 1.8.3 as well, so it's entirely possible that this behaviour has been fixed in 1.8.4 (but I haven't yet upgraded).


Anyway, YMMV. Keep up the good work - it's an excellent tool.
Zee is offline   Reply With Quote