Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Simple php (probably) need help
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Fri Oct 30, 2009 3:25 pm    Post subject: Simple php (probably) need help Reply with quote

ok I've seen many pages that are like this http://domain.com/download/directx.php?type=win

Ok now i've got a question, how can I do this. For example if it's ?type=win then it opens one page, but if it's ?type=mac it opens another page.

P.S. do these things have names?
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Fri Oct 30, 2009 3:53 pm    Post subject: Reply with quote

http://www.w3schools.com/PHP/php_get.asp
Back to top
View user's profile Send private message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Fri Oct 30, 2009 4:09 pm    Post subject: Reply with quote

Ok.. but people don't actually see the "php queries" (yes I know how they are called now Wink) and that tutorial didn't actually told how to make links with queries..
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Fri Oct 30, 2009 4:15 pm    Post subject: Reply with quote

I think you have to use javascript for that.
Simple example
The javascript should then redirect the user to a page with the appropriate php query.
Back to top
View user's profile Send private message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Fri Oct 30, 2009 4:50 pm    Post subject: Reply with quote

I am in http://domain.com
I have a page called stuff.php

I also have a page called lol.php
i want people to access to lol.php vial stuff.php?=lol

is it possible?
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Fri Oct 30, 2009 5:01 pm    Post subject: Reply with quote

Code:
// file.php?a=x
<?php
echo "a is ", $_GET['a'];
?>
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Fri Oct 30, 2009 5:13 pm    Post subject: Reply with quote

display.php
Code:

<?php
$page = $_GET["page"];
include($page . ".php");
?>


Example URL:

http://www.foo.com/display.php?page=bar

Very basic example, but you want to edit it so that it isn't vulnerable to LFI (Local File Inclusion). A simple way to do this is by disallowing special characters in variables. Some of those characters being "/", "\", "." (minus the quotes).

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Sat Oct 31, 2009 2:52 am    Post subject: Reply with quote

oib111 wrote:
display.php
Code:

<?php
$page = $_GET["page"];
include($page . ".php");
?>


Example URL:

http://www.foo.com/display.php?page=bar

Very basic example, but you want to edit it so that it isn't vulnerable to LFI (Local File Inclusion). A simple way to do this is by disallowing special characters in variables. Some of those characters being "/", "\", "." (minus the quotes).


Thank you man, it worked really great Very Happy that's what I was looking for
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat Oct 31, 2009 10:02 am    Post subject: Reply with quote

No problem Smile
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
CourtneyMarie
How do I cheat?
Reputation: 0

Joined: 27 Oct 2009
Posts: 4

PostPosted: Mon Nov 02, 2009 3:41 am    Post subject: Reply with quote

It's a simple $_GET['type']; command!


example
Code:

<?php
$type = $_GET['type'];
echo $type;
?>

Now save that under index.php

simply do

yourdomaincom/index.php?type=mac

and the page will display mac.. then you can redirect it using include

Code:

<?php
$type = $_GET['type'];
if($type == "mac")
   include("mac.php");
else
   include("win.php");
?>


enjoy Smile
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Tue Nov 03, 2009 3:40 pm    Post subject: Reply with quote

oib111 wrote:
display.php
Code:

<?php
$page = $_GET["page"];
include($page . ".php");
?>


Example URL:

http://www.foo.com/display.php?page=bar

Very basic example, but you want to edit it so that it isn't vulnerable to LFI (Local File Inclusion). A simple way to do this is by disallowing special characters in variables. Some of those characters being "/", "\", "." (minus the quotes).


Rofl.

Better:
Code:
<?php
   if(!isset($_GET['p']))
      die("failed");
   header(sprintf("Location http://www.yourdomain.com/%s.php", $_GET['p']));
?>
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Nov 03, 2009 6:07 pm    Post subject: Reply with quote

Not sure what you find so hilarious about my post that it makes you "rofl". Never said my code was perfect, in fact I said it needed to be edited.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Tue Nov 03, 2009 6:52 pm    Post subject: Reply with quote

oib111 wrote:
Not sure what you find so hilarious about my post that it makes you "rofl". Never said my code was perfect, in fact I said it needed to be edited.
Well that's what you get from a mediocre programmer, a snippet that's full of exploits and bugs.
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Nov 03, 2009 7:24 pm    Post subject: Reply with quote

I intentionally left it with bugs/vulnerabilities. If it had bugs/vulnerabilities simply because of my own incompetence then yes, you could say I'm mediocre PHP programmer.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Tue Nov 03, 2009 7:38 pm    Post subject: Reply with quote

oib111 wrote:
I intentionally left it with bugs/vulnerabilities. If it had bugs/vulnerabilities simply because of my own incompetence then yes, you could say I'm mediocre PHP programmer.
Oh yes, teach him with a exploit infested snippet.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites