How to locating a transaction with my website

I use PureStake API to locate a transaction. When i run the script i just see a white page, instead from terminal works perfect