Reputation: 2160
I have an access to an API under this link:
It gets me back a ticket id in such manner:
JsonPCallBack({
"Ticket": "GEZDIMZRHFTDEZRYGVSTEMJNGM2DMLKMNGRRWGMZNHA4DIMRNGE4DAZRTMVRTKMJXMUZSYTKXLEZEETSQJQ3DINKBGRDTMMSHJFBUMQKSGNLDKM2PKFFVITCG"
})
The issue is that every 3 hours it expires.
How would you make with php so that the script would regenerate itself evey 3 hours and save the ticket into:
$config = array(
"ticket" => "GEZDIMZRHFRWGMZQGJSWKZRNGYYTCOLDMDNRSWCZRNMIYTIMJNMNSWGZTBHA2DGYLBGI4CYN2CJNBDIU2KIVBUEWSUKZHTOSKBIRKUYU2EIVLFUR2WKRBFKWCI"
);
Thanks!
Upvotes: 2
Views: 90
Reputation: 16334
You can do the following which is very similar to managing OAuth access token refresh:
This approach has the follow benefits:
Upvotes: 2