View Full Version : hmm phpbb code for ip search not working

04-03-2003, 12:45 PM
well here is what i have so far.. the IPs get encrypted into hex format BTW so yea lol hereis my code i know its not done yet:

$phpbb_root_path = './../';
require($phpbb_root_path . 'config.php');
mysql_connect($dbhost, $dbuser, $dbpasswd);
$post = $_POST['ipaddresss'];
GLOBAL $post;
$findip = ENCODE_IP("$post");
if($mode=="search") {
$sql="SELECT * FROM phpbb_posts WHERE poster_ip='" . $findip . "'";
while($fetch=mysql_fetch_row($query)) {
$usersql="SELECT * FROM phpbb_users WHERE user_id='" . $fetch[3] . "'";
while($userfetch=mysql_fecth_row($userquery)) {
if($mode=="") {
echo"<form action=ipsearch.php?mode=search method=POST>
<input type=text name='ipaddresss'><br><input type=submit>
it says th encode_ip() functiuon is called to undefined

04-03-2003, 02:34 PM
we need to see the ENCODE_IP() function ... + the GLOBAL call is pointless unless you are already within a function , even then if you just use $_POST['ipaddress'] then its automagically global.

but post the ENCODE_IP() function else we cant really help.

04-03-2003, 07:11 PM
And don't forget to use indentation and a little more whitespace to maintain the readability of your code, stoodder. Makes it easier for us to help.

04-03-2003, 08:39 PM
lol ya sorry oh yea i knew it was already global cept i couldnt get the code to work so i just tested you know??? but if you want here ius my page the thingy is located at still doesnt work so yea lol http://forum.shadowgelert.com/admin/ipsearch.php

04-03-2003, 10:06 PM
And this page basically tells us what firepages had already diagnosed.. the function encode_ip is unknown in the script. Perhaps you should include the function in this script so it can be used, hm?

04-04-2003, 01:58 PM
ooo ic so that means there is no fontction encode php thats why! ha thankies lots i get it now lol