Uh i was wondering if i could check a string from a url in php. I've used something similar to this in c++ and i was wondering if i could get a sneak peak of what it would look like in php. And before you ask no i have not tried to do it because i simply dont know where to start i have not touched php in 3 years now. And for those who dont understand what i am in need of i can give an example basically i want to use php to check my website https://duece-aim.000webhostapp.com/status.txt and see if the string is "1.0" and if it is "1.0" the code continues etc.
Check out the Internet Documentation, you can use `getURL` to fetch a page. Then you can convert the string to json. Internet Documentation: https://jenkins.pmmp.io/job/PocketM...1b/classpocketmine_1_1utils_1_1_internet.html Example: PHP: function fetchJson(string $url){ $data = \pocketmine\utils\Internet::getURL($url); // This will get the data on the url $jsondata = json_decode($data); // Convert string to URL return $jsondata; // Returns the Data } PHP: $url = "https://gist.githubusercontent.com/ErikPDev/e6997ead97591d4d1c703efec26f82af/raw/c7de5291dcdbde8ecb70ed40acadd4e5f0d51557/file.json"; // URLvar_dump( $this->fetchJson($url) );