Hi - Take this with a grain of salt, because I am not sure I
really understand what this code is doing (or why some of it even
works;). However my guess is that the symptoms you describe are
due to the fact that you are not escaping the query. The ';' has
special meaning to the shell (the same would be true if you used
a '&' instead). As such, I think that ;page=$page will end up
being truncated from the query string and not seen by htsearch.
Kevin Breit's bits of 25 Jun 2002 translated to:
> I am using the following code to get ht://dig's results to integrate
>into the website interface:
>$words = EscapeShellCmd(UrlEncode($words));
>$config = "/etc/htdig.conf";
>$words = urldecode($words);
>list ($words, $page) = split (";", $words, 2);
>list ($junk, $page) = split ("=", $page, 2);
>echo ("Page: $page<br>");
>echo ("Junk: $junk");
>$query = "-c $config words=\"$words\";page=$page";
>$resultcount = count($result);
>for($i = 2 ; $i < $resultcount ; $i++)
> echo $result[$i];
>However, when I click to go to the next page, it doesn't actually
>incrememnt the page #. It lets it go to the next page, and the URL
>reflects this change. However, it still says 1-10 of 206.
>Could anyone offer suggestions?
>This sf.net email is sponsored by: Jabber Inc.
>Don't miss the IM event of the season | Special offer for OSDN members!
>JabConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn
>htdig-general mailing list <htdig-general@...>
>To unsubscribe, send a message to <htdig-general-request@...> with a subject of unsubscribe