This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-08-22 10:29:21

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

I need somebody who knows PHP!

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:

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

 

#2 2011-08-22 12:32:31

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: I need somebody who knows PHP!

bump!


◕‿◕

Offline

 

#3 2011-08-22 13:54:01

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: I need somebody who knows PHP!

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!

Last edited by GP1 (2011-08-22 13:54:48)


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#4 2011-08-22 16:42:20

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: I need somebody who knows PHP!

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

 

#5 2011-08-22 17:07:41

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: I need somebody who knows PHP!

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?


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#6 2011-08-22 17:16:58

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: I need somebody who knows PHP!

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.  big_smile

Last edited by flashgocrazy (2011-08-22 17:23:19)


◕‿◕

Offline

 

#7 2011-08-22 17:26:16

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: I need somebody who knows PHP!

bump


◕‿◕

Offline

 

#8 2011-08-22 17:44:48

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: I need somebody who knows PHP!

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.


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#9 2011-08-23 08:58:22

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: I need somebody who knows PHP!

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

 

#10 2011-08-23 10:17:29

flashgorcazy-test
New Scratcher
Registered: 2011-08-23
Posts: 5

Re: I need somebody who knows PHP!

bump

Offline

 

#11 2011-08-23 10:34:42

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: I need somebody who knows PHP!

bump


◕‿◕

Offline

 

#12 2011-08-25 22:28:06

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: I need somebody who knows PHP!

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


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#13 2011-08-26 03:57:15

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: I need somebody who knows PHP!

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

 

#14 2011-08-26 09:40:47

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: I need somebody who knows PHP!

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

 

#15 2011-08-26 14:24:13

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: I need somebody who knows PHP!

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.


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#16 2011-08-26 14:30:30

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: I need somebody who knows PHP!

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 am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#17 2011-08-26 15:09:10

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: I need somebody who knows PHP!

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.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#18 2011-08-26 20:34:34

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: I need somebody who knows PHP!

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  yikes


◕‿◕

Offline

 

Board footer