PHP->ASP

From: Date: Thu, 25 Oct 2001 15:24:35 +0000
Subject: PHP->ASP
Groups: php.general 
Request: Send a blank email to php-general+get-72287@lists.php.net to get a copy of this message
Can anyone show me the ASP equivalent to this PHP code I cut from a Weather script? I need to know how to get the response from the server into a string array fo process each line. $weather_url = "http://iwin.nws.noaa.gov/iwin/tx/hourly.html"; $city_name = "AUSTIN"; exec ("$wget_command $weather_url", $raw_contents); // We got the weather data we needed, so we can proceeed $located = 0; foreach ($raw_contents as $line) { // line may wrap in editor if (preg_match ("/^$city_name\s+\S+\s+(-*\d{1,3})\s+(\d{1,3})\s+(\d{1,3})\s+ (\D+)(\d*)\S*\s+(\d{2}\.\d{2})([FRS]{1})/", $line, $regs)) { $temp = $regs[1]; $dewpoint = $regs[2]; $humidity = $regs[3]; $wind_direction = trim($regs[4]); $wind_speed = $regs[5]; $pressure = $regs[6]; $pressurechg = trim($regs[7]); // Falling, Rising, Steady $located = 1; break 1; } }

« previous php.general (#72287) next »