php - file_get_contents against symfony2 -
i have file_get_contents($myurl) call flat php script isn't working.
if run $myurl in browser works fine, if on file_get_contents() behaves if url incorrect or incomplete.
the myurl looks this
https://login.myapp.com/getwifisettings/ofbosf593f where last part token, , sym2 webapp behaves if token incorrect, same way if paste last character in browser (thus producing incorrect token).
i don't know whether issue caused file_get_contents() (do need parameters work?) or if security setting in sym2 installation denies access such call (how distinguish between user's web browser calling route , script using file_get_contents access route?)
try trim() on string before submit file_get_contents. may whitespace character in variable , being submitted , interpreted part of url.
Comments
Post a Comment