Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call to forecast.io.php #14

Open
consolacion opened this issue Mar 20, 2017 · 0 comments
Open

call to forecast.io.php #14

consolacion opened this issue Mar 20, 2017 · 0 comments

Comments

@consolacion
Copy link

the weather.php makes a call to lib/forecast.io.php
I presume that file should be on the same server as weather.php, but it is nowhere to be found. maybe thats the reason why a call to http://serverIP/weather.php?apiKey=APIKEY&lat=40.71&lon=-74&units=us

gives what looks is a shorter json (as compared to what is coming from darksky.net, but without any values:
getCurrentConditions($latParam, $lonParam); echo "CURRENT_TEMP=".round($condition->getTemperature())."\n"; echo "CURRENT_HUMIDITY=".($condition->getHumidity()*100)."\n"; echo "CURRENT_ICON=".($condition->getIcon())."\n"; echo "CURRENT_SUMMARY=".$condition->getSummary()."\n"; $conditions_week = $forecast->getForecastWeek($latParam, $lonParam); echo "MAX_TEMP_TODAY=".round($conditions_week[0]->getMaxTemperature()) . "\n"; echo "MIN_TEMP_TODAY=".round($conditions_week[0]->getMinTemperature()) . "\n"; echo "ICON_TODAY=".$conditions_week[0]->getIcon()."\n"; echo "SUMMARY_TODAY=".$conditions_week[0]->getSummary()."\n"; echo "MAX_TEMP_TOMORROW=" . round($conditions_week[1]->getMaxTemperature()) . "\n"; echo "ICON_TOMORROW=".$conditions_week[1]->getIcon()."\n"; echo "MIN_TEMP_TOMORROW=".round($conditions_week[1]->getMinTemperature()) . "\n"; echo "SUMMARY_TODAY=".$conditions_week[1]->getSummary()."\n"; ?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant