can somebody make a php page that when directed to loads http://scratch.mit.edu/projects/insertuserhere/idhere/loveit and goes back to the previous page or redirects to a custom page
it would look like this:
http://dl.dropbox/test95/love-it.php?user=flashgocrazy&projectid=1953922&redirecturl=back
and also:
http://dl.dropbox/test95/love-it.php?user=flashgocrazy&projectid=1953922&redirecturl=http://scratch.mit.edu/users/flashgocrazy
NOTE: BOTH PAGES ARE FAKE URLS THAT IS JUST WHAT IT MIGHT LOOK LIKE
EDIT: I HAVE THE CODE I JUST NEED SOMEBODY TO UPLOAD IT SOMEPLACE AND TEST IT:
HERE IS THE CODE:
<?php
//makes sure there is all the info needed
if(isset($_GET['user'])&&isset($_GET['redirecturl'])&&isset($_GET['projectid'])){
/******************************************************
*********************CODE TO EXECUTE HERE WHEN PAGE IS LOADED*********************
*******************************************************/
//start redirect with the GET request
//assumes that the get info for the redirecturl is ( example )scratch.mit.edu not http://scratch.mit.edu
header('Location: http://'.$_GET['redirecturl']);
}
?>TESTERS
• flashgocrazy
Ask to be a tester in the posts!!
Last edited by flashgocrazy (2011-08-23 09:56:44)
Offline
bump!
Offline
There is no way to make the page hit the b ac button in php(there is in javascript) but if you include the back url in the GET info, then it will work.
<?php
//makes sure there is all the info needed
if(isset($_GET['user'])&&isset($_GET['redirecturl'])&&isset($_GET['projectid'])){
/******************************************************
*********************CODE TO EXECUTE HERE WHEN PAGE IS LOADED*********************
*******************************************************/
//start redirect with the GET request
//assumes that the get info for the redirecturl is ( example )scratch.mit.edu not http://scratch.mit.edu
header('Location: http://'.$_GET['redirecturl']);
}
?>I would do javascript but it isn't allways on. But there you go!
Last edited by GP1 (2011-08-22 13:54:48)
Offline
GP1 wrote:
There is no way to make the page hit the b ac button in php(there is in javascript) but if you include the back url in the GET info, then it will work.
Code:
<?php //makes sure there is all the info needed if(isset($_GET['user'])&&isset($_GET['redirecturl'])&&isset($_GET['projectid'])){ /****************************************************** *********************CODE TO EXECUTE HERE WHEN PAGE IS LOADED********************* *******************************************************/ //start redirect with the GET request //assumes that the get info for the redirecturl is ( example )scratch.mit.edu not http://scratch.mit.edu header('Location: http://'.$_GET['redirecturl']); } ?>I would do javascript but it isn't allways on. But there you go!
can you upload that somewhere?
Offline
flashgocrazy wrote:
GP1 wrote:
There is no way to make the page hit the b ac button in php(there is in javascript) but if you include the back url in the GET info, then it will work.
Code:
<?php //makes sure there is all the info needed if(isset($_GET['user'])&&isset($_GET['redirecturl'])&&isset($_GET['projectid'])){ /****************************************************** *********************CODE TO EXECUTE HERE WHEN PAGE IS LOADED********************* *******************************************************/ //start redirect with the GET request //assumes that the get info for the redirecturl is ( example )scratch.mit.edu not http://scratch.mit.edu header('Location: http://'.$_GET['redirecturl']); } ?>I would do javascript but it isn't allways on. But there you go!
can you upload that somewhere?
Why? do you want to test it or something?
Offline
GP1 wrote:
flashgocrazy wrote:
GP1 wrote:
There is no way to make the page hit the b ac button in php(there is in javascript) but if you include the back url in the GET info, then it will work.
Code:
<?php //makes sure there is all the info needed if(isset($_GET['user'])&&isset($_GET['redirecturl'])&&isset($_GET['projectid'])){ /****************************************************** *********************CODE TO EXECUTE HERE WHEN PAGE IS LOADED********************* *******************************************************/ //start redirect with the GET request //assumes that the get info for the redirecturl is ( example )scratch.mit.edu not http://scratch.mit.edu header('Location: http://'.$_GET['redirecturl']); } ?>I would do javascript but it isn't allways on. But there you go!
can you upload that somewhere?
Why? do you want to test it or something?
yes.
Last edited by flashgocrazy (2011-08-22 17:23:19)
Offline
bump
Offline
GP1 wrote:
trust me, it works. it can't go wrong. I don't feel like hosting it right now, your just going to have to trust me.
well, what should the html page be like?
should it be love it.php or leve it.htm
Offline
bump
Offline
bump
Offline
lets get this overwith. If a file has ANY php code in it (inserted inside <?php //code goes here ?> tags) than you put it as a .php. Otherwise, if its an html file, then put the extension as .html or .htm
Offline
GP1 wrote:
lets get this overwith. If a file has ANY php code in it (inserted inside <?php //code goes here ?> tags) than you put it as a .php. Otherwise, if its an html file, then put the extension as .html or .htm
Actually some servers automatically parse all files through the PHP parser before displaying them, but that slows down everything.
Offline
GP1 wrote:
trust me, it works. it can't go wrong. I don't feel like hosting it right now, your just going to have to trust me.
all the php does is redirect using redirecturl=
Offline
flashgocrazy wrote:
GP1 wrote:
trust me, it works. it can't go wrong. I don't feel like hosting it right now, your just going to have to trust me.
all the php does is redirect using redirecturl=
I know, I know. Fine, I'll host it.
Offline
Here you go. go to:
http://kitcatprogramming.net78.net/test … ch.mit.edu
This will redirect to scratch.mit.edu. You can change the redirecturl= to any website you want, but don't add the http:// before the address.
You have to have the user= and the projectid= set to some sort of value, but i doesn't matter what value that is.
Offline
GP1 wrote:
There is no way to make the page hit the b ac button in php(there is in javascript) but if you include the back url in the GET info, then it will work.
Code:
<?php //makes sure there is all the info needed if(isset($_GET['user'])&&isset($_GET['redirecturl'])&&isset($_GET['projectid'])){ /****************************************************** *********************CODE TO EXECUTE HERE WHEN PAGE IS LOADED********************* *******************************************************/ //start redirect with the GET request //assumes that the get info for the redirecturl is ( example )scratch.mit.edu not http://scratch.mit.edu header('Location: http://'.$_GET['redirecturl']); } ?>I would do javascript but it isn't allways on. But there you go!
for back, chu can use the HTTP referer.
Offline
GP1 wrote:
Here you go. go to:
http://kitcatprogramming.net78.net/test … ch.mit.edu
This will redirect to scratch.mit.edu. You can change the redirecturl= to any website you want, but don't add the http:// before the address.
You have to have the user= and the projectid= set to some sort of value, but i doesn't matter what value that is.
I will check it out after the huricane
Offline