4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 PHP Query String
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
JointComms
WebHelper
WebHelper


Joined: 03 May 2002
Posts: 79
Location: Windsor, CANADA

PostPosted: Fri Nov 15, 2002 5:06 pm (21 years, 5 months ago) Reply with QuoteBack to Top

If I was to type index.php?op=reg, can you tell me what is really happening?

I know it's calling up a screen but it must be calling a file or something.

Here's why, I'm using a piece of PHP software which has the above link in it. I want to remove public access to the link BUT, if someone familiar with the software sees it then they would still know about it. So, I want to rename the file and only I would know what the new name is.

Thanks
OfflineView User's ProfileFind all posts by JointCommsSend Personal MessageSend email
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Fri Nov 15, 2002 5:08 pm (21 years, 5 months ago) Reply with QuoteBack to Top

By calling index.php?op=reg, the person is in fact opening the index.php file, which will then perform a different action depending on what is after the "?" sign.

However, without looking at the code I cannot tell you how to remove the possibility of accessing that page.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
JointComms
WebHelper
WebHelper


Joined: 03 May 2002
Posts: 79
Location: Windsor, CANADA

PostPosted: Fri Nov 15, 2002 5:47 pm (21 years, 5 months ago) Reply with QuoteBack to Top

Hi Daniel,

But, is op=reg a bookmark or flag within the index file or something?

THanks for your time.
OfflineView User's ProfileFind all posts by JointCommsSend Personal MessageSend email
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Fri Nov 15, 2002 5:52 pm (21 years, 5 months ago) Reply with QuoteBack to Top

$op is a PHP variable, and by calling index.php?op=reg you're setting this variable to 'reg'. The PHP script will then do different things depending on the value of $op.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
JointComms
WebHelper
WebHelper


Joined: 03 May 2002
Posts: 79
Location: Windsor, CANADA

PostPosted: Fri Nov 15, 2002 6:13 pm (21 years, 5 months ago) Reply with QuoteBack to Top

Here's part of the code. I don't know if it will help make any sense to you - since it's only part of the script.

$seeIfTheAdminIsSet = checkAdmin();
if($seeIfTheAdminIsSet)
{
$regLink = "<a href=\"index.php?op=reg\">click here</a> to create your own!<BR><BR>";
}
switch($op) {
case "reg":
checkUser();
break;
case "list":
listUsers();
break;
case "testcreateUser":
create_user_dir($isPub, $username, $passwd, $passwd2, $albumSetting, $newsOn, $rateOn, $commentOn, $newsProtect, $email, $siteTitle, $inviteOnly, $defaultAlbum);
break;
default:
echo $regLink;
listUsers();
}


?>
OfflineView User's ProfileFind all posts by JointCommsSend Personal MessageSend email
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Fri Nov 15, 2002 6:15 pm (21 years, 5 months ago) Reply with QuoteBack to Top

Well, if you want to only stop people from going to index.php?op=reg, delete this code:

Code:
case "reg":
checkUser();


If you want to stop people from going to index.php?op=anything, delete all this code:

Code:
switch($op) {
case "reg":
checkUser();
break;
case "list":
listUsers();
break;
case "testcreateUser":
create_user_dir($isPub, $username, $passwd, $passwd2, $albumSetting, $newsOn, $rateOn, $commentOn, $newsProtect, $email, $siteTitle, $inviteOnly, $defaultAlbum);
break;
default:
echo $regLink;
listUsers();
}

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
JointComms
WebHelper
WebHelper


Joined: 03 May 2002
Posts: 79
Location: Windsor, CANADA

PostPosted: Fri Nov 15, 2002 6:27 pm (21 years, 5 months ago) Reply with QuoteBack to Top

I'm gonna try this out - THANKS AGAIN
OfflineView User's ProfileFind all posts by JointCommsSend Personal MessageSend email
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.114566 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme