-4

I have php script, I can run this script with php.

But i want make this script without edit the SESSION AND TOKEN and CAN run on browser with link.

So here go:

My script coin.php

I must edit this script to make this code work.

$get->session = "MYSESSION";
$get->token = "MYTOKEN";

Nah my question is, Can I run this php script WITHOUT edit the php BUT I must edit with LINK

Example: > http://www.example.com/coin.php?session=MYSESSION&token=MYTOKEN

What code should be added on my sript? I want run this script with link

I hope you understand

Thank you so much

Joe Sandy
  • 3
  • 2
  • perhaps [this](http://stackoverflow.com/questions/933367/php-how-to-best-determine-if-the-current-invocation-is-from-cli-or-web-server) might help? – Franz Gleichmann Nov 09 '16 at 18:38
  • @FranzGleichmann I don't think so. I have already read that article – Joe Sandy Nov 09 '16 at 18:39
  • then please clarify your question, because the most probable interpretation that i can read into it is more than solved by that. – Franz Gleichmann Nov 09 '16 at 18:42
  • 2
    *"Can I run this php script WITHOUT edit the php BUT I must edit with LINK"* - Kind of like the 'ol *"can't have your cake and eat it too"* bit. *"I hope you understand"* - Actually it seems like I'm not the only one who doesn't. `$_GET` "maybe"? or are you not doing that now? – Funk Forty Niner Nov 09 '16 at 18:43
  • 1
    Never, *ever*, drink and code. – Jay Blanchard Nov 09 '16 at 18:45
  • @FranzGleichmann I want make my code work like this https://sukange.net/index.php Input Id Ig Lo with 12112112 and then fill 1 - 100 whatever you want. And then see the result and run the result. I hope you understand – Joe Sandy Nov 09 '16 at 18:45
  • ....the plot thickens. Now the question's not only unclear, but too broad. – Funk Forty Niner Nov 09 '16 at 18:45
  • just sit down, think the whole thing over and try to word your question in a way so even a pre-schooler would understand it. without any external samples. (and i bet when you get to that point, the solution will be obvious to you) – Franz Gleichmann Nov 09 '16 at 18:54

1 Answers1

0

to access: http://www.example.com/coin.php?session=MYSESSION&token=MYTOKEN and use the query string values, your code should be:

$get->session = $_GET['session'];
$get->token = $_GET['token'];

see http://php.net/manual/en/reserved.variables.get.php for further information

leoap
  • 1,684
  • 3
  • 24
  • 32