Community discussions

MikroTik App
 
rajamani779
Member Candidate
Member Candidate
Topic Author
Posts: 125
Joined: Sat Mar 26, 2011 7:56 pm

Run PHP

Fri May 06, 2011 9:59 pm

Hello,

can we run php in mikrotik. I have Mikrotik 3.30. Please tell if we can then how.

urgently waiting for answer.
 
User avatar
enk
Member Candidate
Member Candidate
Posts: 165
Joined: Fri Aug 17, 2007 8:59 am
Location: Russia
Contact:

Re: Run PHP

Fri May 06, 2011 10:03 pm

What do you mean? MPLS penultimate hop popping? As I remember the answer is yes =)
 
rajamani779
Member Candidate
Member Candidate
Topic Author
Posts: 125
Joined: Sat Mar 26, 2011 7:56 pm

Re: Run PHP

Fri May 06, 2011 10:18 pm

What do you mean? MPLS penultimate hop popping? As I remember the answer is yes =)
my mean was i want to run php with html files in MIKROTIK Router OS 3.30. Can we run php with php commands in RouterOS.

if yes then how. please explain about it
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Run PHP

Fri May 06, 2011 10:21 pm

No, you cannot.
 
rajamani779
Member Candidate
Member Candidate
Topic Author
Posts: 125
Joined: Sat Mar 26, 2011 7:56 pm

Re: Run PHP

Fri May 06, 2011 10:28 pm

No, you cannot.
Hello Fewi,

i want to start prepaid card system with Authorize.net checkout. Can you please tell us how can i do this..
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Run PHP

Fri May 06, 2011 10:31 pm

Run a webserver that runs your PHP code. Use an external login page server combined with a Hotspot as outlined in these examples: http://wiki.mikrotik.com/wiki/Manual:Cu ... t#Examples
Ensure you add the external server to the walled garden so it's reachable for unauthenticated users.

It's fairly simple to do, really.
 
rajamani779
Member Candidate
Member Candidate
Topic Author
Posts: 125
Joined: Sat Mar 26, 2011 7:56 pm

Re: Run PHP

Fri May 06, 2011 10:44 pm

Run a webserver that runs your PHP code. Use an external login page server combined with a Hotspot as outlined in these examples: http://wiki.mikrotik.com/wiki/Manual:Cu ... t#Examples
Ensure you add the external server to the walled garden so it's reachable for unauthenticated users.

It's fairly simple to do, really.
Please clear me one more thing. How can i connect my mikrotik server with my external page.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Run PHP

Fri May 06, 2011 11:10 pm

I don't understand the question. Can you give an example?
 
qdza
Frequent Visitor
Frequent Visitor
Posts: 53
Joined: Tue Dec 07, 2010 12:13 am

Re: Run PHP

Sat May 07, 2011 3:04 pm

I think he wants Hotspot interface integrate in external web page.
Try to include html block in php this may work :)
 
rajamani779
Member Candidate
Member Candidate
Topic Author
Posts: 125
Joined: Sat Mar 26, 2011 7:56 pm

Re: Run PHP

Sun May 08, 2011 1:07 am

first of thanks to fewi and qdza for answering.
sorry qdza you wrong.

what i want.

i want to design a system in php with mysql for controlling our user in mikrotik. i want to execute commands in mikrotik with api.

so for this i want to paste php files in our routeros files instead of hotspot html files.

i think this time i clear my problem to both of you and others.
now suggest me what can i do.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Run PHP

Sun May 08, 2011 1:16 am

Like I said before, you cannot run PHP on RouterOS. You need to use an external web server and redirect to it in the HTML login pages. The link I posted shows how.
 
User avatar
Hotz1
Member
Member
Posts: 393
Joined: Tue Oct 09, 2007 6:55 am

Re: Run PHP

Mon May 16, 2011 5:41 am

i want to design a system in php with mysql for controlling our user in mikrotik. i want to execute commands in mikrotik with api... so for this i want to paste php files in our routeros files instead of hotspot html files.
The hotspot miniserv does not support PHP. It isn't even a complete web server, as it only responds to a few predefined requests (e.g., login, status, logout). The closest thing I can think of would be to implement your GUI on an external web server, and use a redirect page on the RB to pass to the the web server whatever arguments it will need.
 
hellweiss
newbie
Posts: 35
Joined: Thu Sep 02, 2010 10:36 am

Re: Run PHP

Mon May 16, 2011 2:31 pm

You probably want this ?!?

http://wiki.mikrotik.com/wiki/API_PHP_class

regards
 
saintmg
just joined
Posts: 2
Joined: Sat Aug 20, 2022 3:15 pm

Re: Run PHP

Sat Aug 20, 2022 7:42 pm

Where is mikrotik PHP class now