Shadow
Shadow

Reputation: 505

How can I use the response I get from cURL in php in the script itself

What I'm trying to say is I have an authentication script that I'm trying to set up. Basically when a user goes to submit the form it checks if the script is allowed to using cURL. I'm trying to figure out the best way to get it to ONLY proceed, and process the form that is, if the response is valid. I want to include some code in the script FROM the cURL making it impossible to "null" the script...

So PHP script that handles the request will cURL to a url on my server asking for authentication using a serial key and the domain name. If my server proves it to be a legit request, it will return a block of php that will execute on the remote end.

So for example if my server says its fine, it would output, just as an example:

echo "lol";

and then the page on the remote end (not my server end) will process that, inline, and output lol on their page...

Is this possible? If not, can anyone suggest a better way I do this?

Your help is very much appreciated :)

Thanks,

~Shadow

Upvotes: 0

Views: 194

Answers (1)

RomanG
RomanG

Reputation: 128

Try using eval($command); function however I would not recommend this is very unsafe way dealing with this;

Better just encode ur software with IONCube or ZendEncoder so none of your clients would steal ur app.

Upvotes: 1

Related Questions