Jump to content

Redirecting a parameter from a PHP page to another, with POST data


DDRRE

Recommended Posts

This is how it goes:

All ibProArcade (a mod for IPB 1.3, uses flash games) games released have a link that isn't related to the base_url variable (allows functions to be passed through another PHP page). Because of this, all scores submitted use this link:

<root folder>/index.php?act=Arcade&do=newscore .

 

Since I use HebIPBNuke (a hybrid combining PHP-Nuke and IPB1.3, Hebrew edition), the root folder is:

/IPBNuke

but the forums folder is:

/IPBNuke/modules/Forums.

 

The arcade recognises the root folder as the forums folder because the forums are launched from it, through a modules.php file, for example:

http://www.mysite.com/IPBNuke/modules.php?name=Forums&act=Arcade

 

The games submit scores incorrectly, through the PHP-Nuke portal:

http://www.mysite.com/IPBNuke/index.php?act=Arcade&do=newscore

(normally the forum would be installed in the root folder, and the forum's index.php launches the Arcade mod)

 

To fix this, I decompile every game and edit all instances of index.php? to modules.php?name=Forums&, and the games submit scores through this link:

http://www.mysite.com/IPBNuke/modules.php?name=Forums&act=Arcade&do=newscore

 

But some games can't decompile correctly due to sophisticated code.

 

Could the index.php file (PHP-Nuke's) be changed to transfer all data from index.php? to modules.php?name=Forums& whenever it recieves act=Arcade as a parameter?

 

(whenever index.php recieves a link with ?act=Arcade as a parameter, it will redirect it to modules.php with ?name=Forums&act=Arcade as a parameter, with all sub-parameters.

 

index.php?act=Arcade&do=newscore

will redirect to

modules.php?name=Forums&act=Arcade&do=newscore

along with the POSTDATA.

 

This could help with transferring the POST data:

http://forums.invisionpower.com/lofiversio...hp/t198838.html

 

Here's a link to the PHP-Nuke index.php and modules.php files, and the IPB1.3 index.php file, along with PHP files that may help and an example game:

 

http://zofim.d-p.co.il/IPBNuke/plzfix.zip

 

Hopefully a PHP programmer would be able to fix this, or come up with a better idea.

is this what you want

if(isset($_GET['act'])
{
if($_GET['act']=="Arcade")
{
http_redirect("realpath", array("name" => "Froum","act" => "Arcade","Do" => "newsocre"), true, HTTP_REDIRECT_PERM);
}
else
{
//something
}
else
{
//something
}

the problems here is , you can post the variables whatever you specified in the array. If u want to append  it specifies in the URL itself.

 

I'm sorry, but I couldn't understand the problem.

Do you mean that the score itself would appear in the URL, allowing users to exploit what was supposed to be hidden POST data?

 

(I'm sorry, I have absolutely no true php programming experience except trial-and-error with bugs)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.