Hello all,
I have got some assignment to do. Its a php assignment. But I cant seem to figure out how to proceed. Can anyone please help me with this script?
Will really be grateful to who ever helps me.
Will PM the details to the person who want to help me
Thank you
Regards
Praveer
Can you possibly provide any more information? How big is the script and how much help do you need exactly?
Yeah sure. Actually I want myversion.php to run the script of installation with commandline.
myversion.php will be in the root directory of cPanel account when the Client Loads myversion.php it will run the script.
I hope thats sufficient.
Can u be plz a lil more elaborate? I cant understand how to start it.
Can u please provide me a sample code as to how the script which I want help with will look like?
Thanks
What sort of script do you want it to run? Bash, PHP, etc...
From what I understood, you want to run something in the CLI. So just do something like this:
<?php
shell_exec('whoami');
?>
Replace whoami with the command(s) you want.
Yeah, I still don't fully understand exactly what you want. I'm guessing you want to do what faviouz mentioned above. You can also use the system() function I believe.
Yeah CLI....So the script is made after I replace whomi in above code with the command line code?
Thanks
Command line is
http://ip/~username/step2.php?instal...7UHA8AS52UIJDS &bwreset=my_secret_password&bwlimit=4096&bwformat= 0&maxconnect=5 &(bla bla)
Cpanel Username --> username
What about the username part? Will the user himself enter his username or I need to do something else?
Any one please help
You need to give us the actual assignment. That would be immensely more helpful than a filtered explanation.
However, realize that this is an assignment and we're not going to give you a complete solution. You're learning for a reason.