Connecting Tech Pros Worldwide Forums | Help | Site Map

How can I get this link to work ?

Familiar Sight
 
Join Date: Jan 2009
Posts: 166
#1: 3 Weeks Ago
Hello,

I have my site analyzer script nearly working, but
the link that I am trying to pass back to the
query is not being accepted.

The easiest way to explain what I mean is to
show you the script on my server:

When you follow the link below you will see an output
list of links that are taken from the website ( one of mine)

Clicking on the "open" works fine ( that url is opened
in a new window) but clicking on the displayed link is suppoed
to result in the link being queried - but it doesn't work.

Here is the working script.

Site Analyzer

You need to hit the "Go" button


Here is the code that should make the displayed link become the
subject of the script.


Expand|Select|Wrap|Line Numbers
  1. echo "<TR><TD VALIGN=TOP COLSPAN=2 BGCOLOR=#000000><B><CENTER>
  2. <FONT COLOR=#FFFFFF>Links Found:<br>Click one to send the ninja to investigate it</FONT>
  3. </CENTER></B></TD></TR>\n";
  4. if (count($ninja->link_array) <= 0)
  5.     {
  6.     echo "<TR><TD VALIGN=TOP COLSPAN=2 BGCOLOR=#DDDDDD><CENTER>No Links Found</CENTER></B></TD></TR>\n";
  7.     }
  8.  
  9. for ($i = 0 ; $i < count($ninja->link_array) ; $i++)
  10.     {
  11.     echo "<TR><TD WIDTH=100 VALIGN=TOP BGCOLOR=#DDDDDD>
  12. [<A HREF=\"" . $ninja->link_array[$i] . "\" TARGET=_blank>open</A>]&nbsp;&nbsp;&nbsp;Link " . ($i + 1) . ": </TD>
  13. <TD VALIGN=TOP BGCOLOR=#DDDDDD>
  14. <A HREF=\"index.php?url=" . urlencode($ninja->link_array[$i]) ."&words=$words\">" . $ninja->link_array[$i] . "</A>
  15. </TD></TR>\n";
  16.     } 
Can anyone see what I have done wrong ?

(Maybe I also need to post the main ninja class,?? )

PS - the new url shows in my browser but nothing happens !!


Thanks

Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,754
#2: 3 Weeks Ago

re: How can I get this link to work ?


Hey.

The links that you print for the URLs in the "Links found" section are missing the "doit=yes" GET parameter.
Familiar Sight
 
Join Date: Jan 2009
Posts: 166
#3: 3 Weeks Ago

re: How can I get this link to work ?


Thanks,
I added that in and it works now :)
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,949
#4: 3 Weeks Ago

re: How can I get this link to work ?


Quote:

Originally Posted by Atli View Post

Hey.

The links that you print for the URLs in the "Links found" section are missing the "doit=yes" GET parameter.

Great catch. I looked at this for, like, 20 minutes yesterday and couldn't figure it out ><
Reply