Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Calling osascript from PHP possible?!

Calling osascript from PHP possible?!
Thread Tools
Dedicated MacNNer
Join Date: May 2002
Location: Brooklyn, NY
Status: Offline
Reply With Quote
Jun 11, 2003, 12:02 AM
 
Hi,
Is it possible to use "osascript" from PHP? I'm trying it and it's not working. I've even tried saving my script as a file and running it from osascript, but no dice. Here's what I have:

[php]
$mp3s = shell_exec("/usr/bin/osascript get_tracks");
echo $mp3s;
[/php]

get_tracks just asks iTunes for the name of the current track. The script itself works fine, but calling it from PHP does not. Could it be that you have to be running osascript from the same user that's logged in, and perhaps PHP runs on the www user?

Any advice for how to get a print out of ALL (even non-itunes playing) mp3s on a system and show 'em on a web page?

Thanks,
gabe
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:41 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2