...

View Full Version : My link made with urlencode() wont work, please help.



jeddi
11-01-2009, 04:07 PM
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 (http://www.sd5.info/ninja/index.php)

You need to hit the "Go" button


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



echo "<TR><TD VALIGN=TOP COLSPAN=2 BGCOLOR=#000000><B><CENTER>
<FONT COLOR=#FFFFFF>Links Found:<br>Click one to send the ninja to investigate it</FONT>
</CENTER></B></TD></TR>\n";
if (count($ninja->link_array) <= 0)
{
echo "<TR><TD VALIGN=TOP COLSPAN=2 BGCOLOR=#DDDDDD><CENTER>No Links Found</CENTER></B></TD></TR>\n";
}

for ($i = 0 ; $i < count($ninja->link_array) ; $i++)
{
echo "<TR><TD WIDTH=100 VALIGN=TOP BGCOLOR=#DDDDDD>
[<A HREF=\"" . $ninja->link_array[$i] . "\" TARGET=_blank>open</A>]&nbsp;&nbsp;&nbsp;Link " . ($i + 1) . ": </TD>
<TD VALIGN=TOP BGCOLOR=#DDDDDD>
<A HREF=\"index.php?url=" . urlencode($ninja->link_array[$i]) ."&words=$words\">" . $ninja->link_array[$i] . "</A>
</TD></TR>\n";
}


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

Fou-Lu
11-01-2009, 07:10 PM
You appear to have a hidden field called 'doit'. I would presume you need to send this value as well.

jeddi
11-02-2009, 08:17 AM
Thanks,
I added that in and it works now :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum