Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

JackJones's avatar

Pulling in JSON data from another domain

A while ago I wrote a script for university that worked on my own PC, but when I deployed it it wouldn't work

It turned out that virtually nowhere would let me use cURL (thankfully a kind soul at one host allowed just me to use it for 2 months while I passed the module!)

I want to pull in currency exchange rates once a day at a scheduled time, but am I just going to have the same issue? I don't really want to start programming if I'm just going to hit a brick wall

If not I don't know how on Earth I'm going to do it without using JSONP on a webpage or something, which isn't very good

0 likes
2 replies
goatshark's avatar

@jackjones It sounds like you are/were just having problems because the server(s) you deployed to did not have libcurl installed. If that's the case, it isn't a problem with programming. You just need to make sure the appropriate software is installed on whatever server you're deploying to. You'll either need to make sure libcurl is available by default or that you have the required access to the server (ssh and sudo) to install it yourself. It's a very common library and is usually installed by default. Good luck.

JackJones's avatar

It's more for my customers than myself

Most (all?) free hosts have cURL disabled, aswell as filegetcontents etc, so I'm not really sure how to pull in the data I need each day

Please or to participate in this conversation.