Foxtrek_64
Active member
Hi all,
Hopefully someone here can help me out with some PHP scripting. What need is fairly basic, but PHP is still fairly alien to me.
Essentially, I want to be able to have an external service, in my case EasyCron, make a call to a php file and have it execute the
Psuedo-code below:
In practice the key would likely be a guid or some other randomly-generated value, but 1234 works to illustrate the example.
Hopefully someone here can help me out with some PHP scripting. What need is fairly basic, but PHP is still fairly alien to me.
Essentially, I want to be able to have an external service, in my case EasyCron, make a call to a php file and have it execute the
xf:run-jobs
activity, but I'd like it to be protected by a key so not just anyone can do this.Psuedo-code below:
C#:
private static readonly string keyValue = "1234";
public HttpResponse Execute(string key)
{
return keyValue == key
? XF.RunJobs()
: HttpResponse.AccessDenied;
}
In practice the key would likely be a guid or some other randomly-generated value, but 1234 works to illustrate the example.