Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,683
    Thanks
    28
    Thanked 4 Times in 4 Posts

    My link made with urlencode() wont work, please help.

    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.


    PHP Code:
    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 $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
    Last edited by jeddi; 11-01-2009 at 04:31 PM.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    You appear to have a hidden field called 'doit'. I would presume you need to send this value as well.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #3
    Senior Coder
    Join Date
    May 2006
    Posts
    1,683
    Thanks
    28
    Thanked 4 Times in 4 Posts
    Thanks,
    I added that in and it works now


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •