Hello:
How do you run a UNIX command (like CURL) from PHP? and can the result be put into a variable? Specifically I am wanting to get local weather data from weather.com and put the result into my page.
Thanks,
How do you run a command from PHP
Moderator: General Moderators
-
irishmike2004
- Forum Contributor
- Posts: 119
- Joined: Mon Nov 15, 2004 3:54 pm
- Location: Lawrence, Kansas
-
irishmike2004
- Forum Contributor
- Posts: 119
- Joined: Mon Nov 15, 2004 3:54 pm
- Location: Lawrence, Kansas
yes but should you use exec() or shell_exec() if you just want to run it like a command line run? I was reading about exec and shell exec before I asked. The curl entry you mention looks complex.... I will post the actual command I am needing to run and perhaps then someone can tell me how to set it up. Additionally my PHP was compiled for Mac by a third party... Entrophy... I am not sure if he compiled support for Curl directly in or not.
-
irishmike2004
- Forum Contributor
- Posts: 119
- Joined: Mon Nov 15, 2004 3:54 pm
- Location: Lawrence, Kansas