LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   linux command line & PHP (https://www.linuxquestions.org/questions/programming-9/linux-command-line-and-php-702135/)

ddragas 02-04-2009 01:40 AM

linux command line & PHP
 
Hi all
I'm using Ubuntu 8.10 and want to accomplish following:
1. open firefox with some url
firefox http://www.someurl.com
2 sleep 10 sec; take screen shot of firefox browser
sleep 10; import -window root SomeScreenshotName.jpeg
3. close firefox
//don't kow how to close it with command line

and rest is to manipulate with image ..... (not problem)

problem shows when I first want to call firefox with
exec("firefox http://www.somesite.com");

Nothing Happens... WHY????

also tried to make screenshot at step 2

same thing....

but if I call

exec("traceroute http://www.somesite.com"); it does the job.

can please somebody help me..

CITguy 02-04-2009 01:43 AM

Calling firefox with the exec() function...
Try either adding double quotes to the end of the argument OR removing the initial quotes from the argument.

Closing firefox...
If you only have one instance of firefox running, try "killall firefox".

ddragas 02-04-2009 03:19 AM

didn't understand "add double quotes - or remove double quotes"
can you please write it down in a way it should be...

Thank you for "killall firefox"


All times are GMT -5. The time now is 07:15 AM.