paradoxxjm / ShowMeTheMoney

Weekend Hack. Winner of RHoK DC 06/2012
http://showmethemoney.phpfogapp.com/
4 stars 3 forks source link

[Pie chart doesn't show up] json API requests failing #2

Closed sjobe closed 12 years ago

sjobe commented 12 years ago

This is probably because the host does not allow file_get_contents to be called on external urls. Replace this with a curl call and it should work.

Vjust commented 12 years ago

Let me know if you're tied up, and I can take a look at it later today..

sjobe commented 12 years ago

Go for it if you have the time!

On Mon, Jun 4, 2012 at 4:16 PM, annasaru < reply@reply.github.com

wrote:

Let me know if you're tied up, and I can take a look at it later today..


Reply to this email directly or view it on GitHub: https://github.com/paradoxxjm/ShowMeTheMoney/issues/2#issuecomment-6109374

Vjust commented 12 years ago

Am looking at this issue..

Vjust commented 12 years ago

CHanged to use curl and tested locally. How do I deploy .. Or could someone deploy to see if the switchover to curl fixes the pie-chart?

paradoxxjm commented 12 years ago

Will do a pull and deploy it.

paradoxxjm commented 12 years ago

Just pushed it. The graphs show up, but it seems the arcs on the map still aren't being drawn. Were we using a similar approach to grab that data as well?

sjobe commented 12 years ago

Cool, and yes, we were using a similar approach to get the map co-ordinates from google.

Vijay, look for these two offending lines

$borrower_geo_json = json_decode(file_get_contents(" https://maps.googleapis.com/maps/api/geocode/json?address= ".urlencode($country_codes[$country_code])."&sensor=false"));

$geo_json_url = file_get_contents("

https://maps.googleapis.com/maps/api/geocode/json?address= ".urlencode($country)."&sensor=false");

Those also should be using curl requests.

Thanks, Serign

On Tue, Jun 5, 2012 at 7:56 AM, paradoxxjm < reply@reply.github.com

wrote:

Just pushed it. The graphs show up, but it seems the arcs on the map still aren't being drawn. Were we using a similar approach to grab that data as well?


Reply to this email directly or view it on GitHub: https://github.com/paradoxxjm/ShowMeTheMoney/issues/2#issuecomment-6123204

sjobe commented 12 years ago

done