Subj : FidoGazette Vol 1096 no July 28 2017 Page: 4 To : All From : Janis Kracht Date : Fri Jul 28 2017 12:45:32 ================================================================= A R T I C L E S ================================================================= Weather Door for BBBS by Janis Kracht, 1:261/38,janis@filegate.net A rewrite of my weather door for BBBS was necessary for security reasons. //start getweather.bz int main() { char cs,cc,curl_cmd; cs=""; bbbs("cls"); printf("\e[1;1H\e[1;33mTo get the weather for names containing spaces,"); printf("\e[2;1H\e[1;33menter the name in quotes or use an underscore"); printf("\e[3;1H\e[1;33mfor example, both \"new york\" and new_york work."); printf("\e[4;1H\e[1;33m Or enter your Zip Code if you prefer."); printf("\n\n"); cs=input("Enter City: ",50,0); cc=sprintf("\"%s\"",cs); curl_cmd = sprintf("/usr/bin/curl -o weather.tmp -s wttr.in/%s", cc); system(curl_cmd, 1, 0); system("/usr/bin/head -n 17 weather.tmp", 1, 0); printf("\e[40;1H\e[1;33mPress a key to continue"); getch(); remove("weather.tmp"); bbbs("cls"); } //end getweather.bz Thanks to Kim Heino for pointing this out and a cleaner way to write this :) FIDOGAZETTE Vol 11 No 6 Page 4 February 08, 2017 ----------------------------------------------------------------- --- BBBS/Li6 v4.10 Toy-3 * Origin: Prism bbs (1:261/38) .