Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-06-17 03:57:18
- tomk
- Member
- Registered: 2008-05-15
- Posts: 12
How do I execute a php script with parameters?
Hi, I’m creating a plug-in (new on this) and I want to execute a php script that works fine when running it form command line with parameters
php script.php -q anotherParameter
The plug-in I want to do, as an experiment and to learn plug-in development, is a broken links checker for the admin interface, which could for example place a new tab in the admin panel, and from there you could run a broken links verifier.
I know there are external checkers, but I want to make this as a built-in feature (in plug-in form), that may suit some users over here, and it’s for learning purposes (I saw this request , and found it interesting).
I’m planning to use the following checker that seems to work very nice:
Link Checker from Scriptol
What’s my problem?
How would I implement this so running the script (linche.php) returns all bad and broken links? I know that quiet mode will just echo the broken ones, and that with tag <txp:site_url /> I can get the site url as to pass it as a parameter, but I still don’t know how to call linche.php
I’m aware this may be some basic php, but I just need a quick tip as to show me the right path to follow.
Thanks in advance for reading this humble request, I’ll appreciate any collaboration.
Last edited by tomk (2008-06-17 04:48:15)
Offline
#2 2008-06-17 05:44:15
- tomk
- Member
- Registered: 2008-05-15
- Posts: 12
Re: How do I execute a php script with parameters?
I resolved that maybe using the following .php would be easier:
I have an admin tab registered, how can I get the site url and run the link check for it?
Offline
Re: How do I execute a php script with parameters?
For learning plugin development it’s good.
Just a hint: If you change the code of this script and release it, please note the »no derivs« license. And it’s »non commercial«, too.
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline