Is the PHP code you provided below working, I need something like than and i
wonder if i  could use it.
NOBBY
(ps:  sorry, i can't show u ASP equiv of it coz I do not know)

----- Original Message -----
From: MrBaseball34 <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 25, 2001 9:24 PM
Subject: [PHP] PHP->ASP


> 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;
>   }
> }
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to