Re: [PHP] PHP, ASP, IIS and MySQL
Thanks for your thoughts! / Jeppe John W. Holmes wrote: My questions for you: 1) Is there a penelty/drawback when coding PHP instead of ASP on IIS (towards MySQL)? No, not really. I'm sure ASP has some little tricks built in that you'd have to recreate in PHP, but the two are basically the same, regardless of the OS. 2) Do you see any problems in having both ASP-code and PHP-code on the same server (it seems to work fine for me)? No. 3) (on the edge of topic) Do you have any comments or thoughts concerning the choice of DB. MySQL appears to like Win more than Postgres, or? MySQL seems to be more cross platform and more popular, but PG has a larger feature set. Depends totally upon the complexity of your project which one you use. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, ASP, IIS and MySQL
Hi! I hope this is the right place to ask this kind of question, otherwise I apologize. I would like some advice, this is the situation: We´re using IIS today and unfortunate we will have to cope with this situation for a long time ahead. There are plans for using Apache on Linux but not right now (not even Apache on Win). A great deal of work has been done in coding ASP (towards an Access-DB) :( Now we´re going to replace Access with either MySQL or possibly PostgreSQL. Since we in the future would like to run Apache on Linux instead of IIS on Win, it would be great to code all new functions in PHP instead of ASP (and nicer code too). I have done some experiments with PHP on IIS (towards MySQL) and it all seems to work just fine. My questions for you: 1) Is there a penelty/drawback when coding PHP instead of ASP on IIS (towards MySQL)? 2) Do you see any problems in having both ASP-code and PHP-code on the same server (it seems to work fine for me)? 3) (on the edge of topic) Do you have any comments or thoughts concerning the choice of DB. MySQL appears to like Win more than Postgres, or? Many thanks in advance! Jesper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP, ASP, IIS and MySQL
My questions for you: 1) Is there a penelty/drawback when coding PHP instead of ASP on IIS (towards MySQL)? No, not really. I'm sure ASP has some little tricks built in that you'd have to recreate in PHP, but the two are basically the same, regardless of the OS. 2) Do you see any problems in having both ASP-code and PHP-code on the same server (it seems to work fine for me)? No. 3) (on the edge of topic) Do you have any comments or thoughts concerning the choice of DB. MySQL appears to like Win more than Postgres, or? MySQL seems to be more cross platform and more popular, but PG has a larger feature set. Depends totally upon the complexity of your project which one you use. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP-ASP
In article 023601c15de3$c05d8bc0$[EMAIL PROTECTED], [EMAIL PROTECTED] says... Is the PHP code you provided below working, I need something like than and i wonder if i could use it. NOBBY Actually, right now I'm using some code stripped from the PHP-Nuke Weather add-on. But it gets its weather from msnbc and I'd rather get it from the feds cause they won't change their output. You must know the 4 letter ACCID value, you can get it from NOAA. I use KAUS for Austin, TX like this: http://myhost.com/weather.php?Default_accid=KAUS ? /* Code derived from the PHP-Nuke Weather Add-On */ $fontface = Arial; $fontcolor1 = #00; $fontsize1 = 2; $filehandle = fsockopen(www.msnbc.com, 80, $num_error, $str_error, 30); if(!$filehandle) { print Weather is is not available: $str_error ($num_error)\n; } else { fputs($filehandle,GET http://www.msnbc.com/m/chnk/d/weather_d_src.asp?acid= $Default_accid HTTP/1.0\n\n); // initialize variables $v_City= ; $v_SubDiv = ; $v_Country = ; $v_Region = ; $v_Temp= ; $v_CIcon = ; $v_WindS = ; $v_WindD = ; $v_Baro= ; $v_Humid = ; $v_Real= ; $v_UV = ; $v_Vis = ; $v_LastUp = ; $v_Fore= ; $v_Acid= ; while (!feof($filehandle)) { $grabline = fgets($filehandle, 4096); $grabline= trim($grabline) . \n; if (substr($grabline,7,4) == City) { $v_City= substr($grabline,15,20); } if (substr($grabline,7,6) == SubDiv) { $v_SubDiv = substr($grabline,17,20); } if (substr($grabline,7,7) == Country) { $v_Country = substr($grabline,18,20); } if (substr($grabline,7,6) == Region) { $v_Region = substr($grabline,17,20); } if (substr($grabline,7,4) == Temp) { $v_Temp= substr($grabline,15,20); } if (substr($grabline,7,5) == CIcon) { $v_CIcon = substr($grabline,16,20); } if (substr($grabline,7,5) == WindS) { $v_WindS = substr($grabline,16,20); } if (substr($grabline,7,5) == WindD) { $v_WindD = substr($grabline,16,20); } if (substr($grabline,7,4) == Baro) { $v_Baro= substr($grabline,15,20); } if (substr($grabline,7,5) == Humid) { $v_Humid = substr($grabline,16,20); } if (substr($grabline,7,4) == Real) { $v_Real= substr($grabline,15,20); } if (substr($grabline,7,2) == UV) { $v_UV= substr($grabline,13,20); } if (substr($grabline,7,3) == Vis) { $v_Vis = substr($grabline,14,20); } if (substr($grabline,7,5) == LastUp) { $v_LastUp = substr($grabline,16,20); } if (substr($grabline,7,4) == Fore) { $v_Fore= substr($grabline,15,200); } if (substr($grabline,7,4) == Acid) { $v_Acid= substr($grabline,15,20); } } $v_City= substr($v_City,0,strlen($v_City)-3); $v_SubDiv = substr($v_SubDiv,0,strlen($v_SubDiv)-3); $v_Country = substr($v_Country,0,strlen($v_Country)-3); $v_Region = substr($v_Region,0,strlen($v_Region)-3); $v_Temp= substr($v_Temp,0,strlen($v_Temp)-3); $v_CIcon = substr($v_CIcon,0,strlen($v_CIcon)-3); $v_WindS = substr($v_WindS,0,strlen($v_WindS)-3); $v_WindD = substr($v_WindD,0,strlen($v_WindD)-3); $v_Baro= substr($v_Baro,0,strlen($v_Baro)-3); $v_Humid = substr($v_Humid,0,strlen($v_Humid)-3); $v_Real= substr($v_Real,0,strlen($v_Real)-3); $v_UV = substr($v_UV,0,strlen($v_UV)-3); $v_Vis = substr($v_Vis,0,strlen($v_Vis)-3); $v_LastUp = substr($v_LastUp,0,strlen($v_LastUp)-3); $v_Fore= substr($v_Fore,0,strlen($v_Fore)-3); $v_Acid= substr($v_Acid,0,strlen($v_Acid)-3); } ? !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head title? $v_City ? Weather/title /head body table width=150 cellspacing=0 cellpadding=0 border=1 tr td colspan=5 name=cityst align=center font face=? $fontface ? color=? $fontcolor1 ? size=? $fontsize1 ?b?$v_City?, ?$v_SubDiv?/bfont /td /tr tr td colspan=3 name=temptextTemperature:/td td colspan=2 name=tempdata?$v_Temp ?deg;/td /tr tr td colspan=3 name=humidtextHumidity:/td td colspan=2 name=humiddata?$v_Humid ?%/td /tr tr td colspan=3 name=barotextBarometric Pressure:/td td colspan=2 name=barodata?$v_Baro ?/td /tr tr td name=windtextWind:/td td name=winddir?$v_WindD ?/td td name=attextat/td td name=windspd?$v_WindS ?/td td name=mphtxtmph/td /tr /table /body /html -- 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] 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]
Re: [PHP] PHP-ASP
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]
[PHP] PHP asp
I guess this one is quite interesting... http://www.sitepointforums.com/showthread.php?threadid=19417 and the battle begins... -km -- 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]
Re: [PHP] PHP asp
Bah. No matter how fast I read, by the time I get to the end of a page a new page has filled with comments. I'd say something witty about TIMTOWTDI, microwaves, and what a drunk sorrority girl has in common with R2D2, but I can't get to the end of the friggin' thread! It never ends! *cries* -- Plutarck Should be working on something... ...but forgot what it was. ""Kittiwat Manosuthi"" [EMAIL PROTECTED] wrote in message 008f01c0bfd5$9b78d320$3d88aacb@notebook">news:008f01c0bfd5$9b78d320$3d88aacb@notebook... I guess this one is quite interesting... http://www.sitepointforums.com/showthread.php?threadid=19417 and the battle begins... -km -- 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]
Re: [PHP] PHP asp
Well.. I forgot to warn that read it "only" when you've free time. Having read though all those made me feel sick, and wanted to stop programming for a year. He he. -km - Original Message - From: "Plutarck" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 08, 2001 10:54 AM Subject: Re: [PHP] PHP asp Bah. No matter how fast I read, by the time I get to the end of a page a new page has filled with comments. I'd say something witty about TIMTOWTDI, microwaves, and what a drunk sorrority girl has in common with R2D2, but I can't get to the end of the friggin' thread! It never ends! *cries* -- Plutarck Should be working on something... ...but forgot what it was. -- 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]