0

I want to show the special data (a number) inside a WordPress page. This data is generated by an external API and changes from time to time. I don't have any clue how to manage this.

The data I need is returned when I send GET to the http://35.204.111.14/price.

The data has to be shown inside the post.

0

Just use PHP code, for example :

$price = floatval( file_get_contents( 'http://35.204.111.14/price' ) );
echo $price;

floatval is here to sanitize and assure you to have a float number.

1
  • thank you! this works perfectly like a charm! with the "insert-php" plugin its even possible to prevent any brwoser non-https-insecure error warnings :)
    – AEP
    Oct 18 '19 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.