Re: php + lynx + grep
| From: | John Nichel | Date: | Tue, 06 Apr 2004 17:26:34 +0000 |
| Subject: | Re: php + lynx + grep | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182502@lists.php.net to get a copy of this message | ||
Brian L. Ollom wrote:
What's the output you're looking for. When I run that line of code, and echo out $output, I get... <TD><FONT FACE="Arial,Helvetica"> KTOL 061552Z 22013KT 10SM CLR 11/M03 A3001 RMK AO2 SLP164 T01111033 -- *********************************************************************** * _ __ __ __ _ * John Nichel * * | |/ /___ __ \ \ / /__ _ _| |__ ___ __ ___ _ __ * 716.856.9675 * * | ' </ -_) _` \ \/\/ / _ \ '_| / /(_-<_/ _/ _ \ ' \ * 737 Main St. * * |_|\_\___\__, |\_/\_/\___/_| |_\_\/__(_)__\___/_|_|_|* Suite #150 * * |___/ * Buffalo, NY * * http://www.KegWorks.com john@KegWorks.com * 14203 - 1321 * ***********************************************************************Try.... $output = `lynx --source http://weather.noaa.gov/weather/current/KTOL.html |grep -v '41-35-19N' |grep TOL | head -n 1` Those are backticks, not single quotes surrounding the command.Backticks didn't work either. I got it to work by using a cron to > the info into a text file and then include()'d the text file in the website, but I'd rather not have to rely on the cron job if I don't have to. ----------------------------------------------------------------| Brian Ollom | | | NiteHawke.Com | http://www.nitehawke.com/ || An Authorized Firefly Dealer | email bollom@nitehawke.com | ----------------------------------------------------------------