home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

index.php?mode=something.php

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2624
Discussions: 201,005, Posts: 2,380,071, Members: 246,372
Old October 19th, 2004, 10:35 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Apr 2004
Location: Joplin, Missouri
Posts: 12
index.php?mode=something.php

To start, please don't make fun of me cause I'm a n00b, lol.

Now, what are these index.php?mode=something.php things I keep seeing? Where can I find out more about them, and how to use them? I used to have a script that had some of them in it but I can't seem to find that script now... someone please let me know what this is called and where I can find more information about it. Thank you.

-Ryan
RyanD is offline   Reply With Quote
Old October 19th, 2004, 10:41 PM     #2 (permalink)
Senior Member
 
kantlivelong's Avatar
 
Join Date: Jul 2003
Location: NY
Posts: 771
Send a message via AIM to kantlivelong Send a message via Yahoo to kantlivelong
Welcome to TechIMO!

They are very insecure :P, those sites can be hacked down within a matter of
minutes...

The language is PHP http://php.net

You need real webhosting.(not geocities and such)
__________________
RackByte.com - Web Hosting / Reseller Hosting / VPS / Dedicated Servers / Domain Registration
kantlivelong is offline   Reply With Quote
Old October 19th, 2004, 10:44 PM     #3 (permalink)
Newbie
 
filipino's Avatar
 
Join Date: May 2004
Location: Philippines
Posts: 3,894
Quote:
Originally Posted by kantlivelong
They are very insecure :P, those sites can be hacked down within a matter of minutes...

php? insecure? not that i know of (it depends on coder) php is the script/laguage use to interact with database which is mySQL, php has the same technology as Coldfusion (much easier to learn) but different from ASP.NET.

did i confuse you?
filipino is offline   Reply With Quote
Old October 19th, 2004, 10:47 PM     #4 (permalink)
Senior Member
 
kantlivelong's Avatar
 
Join Date: Jul 2003
Location: NY
Posts: 771
Send a message via AIM to kantlivelong Send a message via Yahoo to kantlivelong
no PHP is secure. but what hes talking about "index.php?mode=something.php" generally is just like this

include($mode);

which can be exploited very easily..

also mysql is just a lib for PHP. PHP wasnt made to interact with mySql but it works well with it.

Last edited by kantlivelong : October 19th, 2004 at 10:51 PM.
kantlivelong is offline   Reply With Quote
Old October 19th, 2004, 10:52 PM     #5 (permalink)
Junior Member
 
Join Date: Apr 2004
Location: Joplin, Missouri
Posts: 12
Well then... what is a secure way of using includes to do what I'm talkin about... I know there's a buttload of different ways to do this. instead of mode I've seen pagename, sid, item, or folder, and several more which I can't think of at the moment. So any idea's on how to make it work for me? Anything is great. Thanks.

Last edited by RyanD : October 19th, 2004 at 10:55 PM.
RyanD is offline   Reply With Quote
Old October 19th, 2004, 10:55 PM     #6 (permalink)
Ultimate Member
 
mazdarx7-64's Avatar
 
Join Date: Aug 2004
Location: Knoxville, TN
Posts: 2,044
For something more secure than PHP i'd suggest Java Server Pages. It is not to different than ASP if you know that already. JSP by itself is not that bad to learn.
__________________
BSOD.........
The reason why I'll be drunk tonight.
Are you a winner?
mazdarx7-64 is offline   Reply With Quote
Old October 19th, 2004, 10:57 PM     #7 (permalink)
Senior Member
 
kantlivelong's Avatar
 
Join Date: Jul 2003
Location: NY
Posts: 771
Send a message via AIM to kantlivelong Send a message via Yahoo to kantlivelong
heres a simple example of how i do it

request:
index.php?p=news

code:
Code:
switch($_REQUEST['p'])
{
     case "news":
          $file="news.php";
     break;

     default:
          $file="home.php";
     break;
}

include($file.php);

Last edited by kantlivelong : October 19th, 2004 at 11:07 PM.
kantlivelong is offline   Reply With Quote
Old October 19th, 2004, 10:58 PM     #8 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,552
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
A secure way? It is called data validation and sanitazion.

You CHECK mode to make sure it is what you think it is.
Post is not any more secure than get. You need to do data validation EITHER way.

I would run $mode through a select statement on its value. This requires you to enumerate all possible pages, but it is quite secure.

Jkrohn
jkrohn is offline   Reply With Quote
Old October 19th, 2004, 10:59 PM     #9 (permalink)
Senior Member
 
kantlivelong's Avatar
 
Join Date: Jul 2003
Location: NY
Posts: 771
Send a message via AIM to kantlivelong Send a message via Yahoo to kantlivelong
Quote:
Originally Posted by mazdarx7-64
For something more secure than PHP i'd suggest Java Server Pages. It is not to different than ASP if you know that already. JSP by itself is not that bad to learn.

as stated before. any language is as secure as the programmer.. on another note.. ASP is usually on windows servers(yuk) and JSP usually means you will need to pay a seperate fee to have it enabled with most webhosts.
kantlivelong is offline   Reply With Quote
Old October 19th, 2004, 11:00 PM     #10 (permalink)
Senior Member
 
kantlivelong's Avatar
 
Join Date: Jul 2003
Location: NY
Posts: 771
Send a message via AIM to kantlivelong Send a message via Yahoo to kantlivelong
Quote:
Originally Posted by jkrohn
A secure way? It is called data validation and sanitazion.

You CHECK mode to make sure it is what you think it is.
Post is not any more secure than get. You need to do data validation EITHER way.

I would run $mode through a select statement on its value. This requires you to enumerate all possible pages, but it is quite secure.

Jkrohn

exactly what i wrote above :P
kantlivelong is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
php links VHockey86 Webmastering and Programming 11 August 22nd, 2004 10:39 PM
CHMOD - Help plz. devildude8989 Webmastering and Programming 10 May 9th, 2003 01:45 PM
How do I set up a test server? Master Chief Webmastering and Programming 22 May 5th, 2003 02:37 PM
PHP include in HTML, help? Whir Webmastering and Programming 7 October 7th, 2002 06:07 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3132)
‘Rogue’ or ‘Rouge’? (10)
Foxconn Blackops x48 MoBo (5)
Nvidia GTX 260 problem (14)
Delete an OS (18)
Laptop with wireless problem. (14)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (9)
windows vista security holes (19)
[F@H SPAM 11/16/09] ! 1/2 months to.. (42)
windows 7 problem (7)
Internet Lost (5)
Recent Discussions
cant access the internet (0)
Charge4All Black Friday Special - Twi.. (0)
Browsers wont load websites (4)
Unallocated Space (3)
Size after cutting 700Mb file is 2.5 .. (1)
Blackberry Bold 9000 (0)
Can't open Word (13)
Rar volume (number 7) (1)
System restore :) (1)
Laptop with wireless problem. (14)
Looking for new motherboard (2)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (42)
add ram to existing (4)
Computer shutting down on its own (6)
EVGA 9800 gtx help with finding a goo.. (13)
"Documents and Settings" fo.. (7)
Delete an OS (18)
Outputing 1080p from my PC to my 720p.. (0)
panasonic dmr ez48veb recorder (0)
Need help getting speakers to work (2)
Nvidia GTX 260 problem (14)
Point and Shoot Camera Suggestions. (9)
Is the PSU I received dead? (16)
FreeAgent drive software not x64 comp.. (1)
Intel 5100 AGN issues fixed yet? (28)


All times are GMT -4. The time now is 05:23 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28