So I've been searching the net diligently and I can't seem to find a good(and basic) example of a callback. I get the idea of a callback but I can't make it work. Here's my sample code:
$fp = fopen("file.txt","wb");
fwrite($fp,"sample content");
fclose($fp);
Basically what it does is create a new txt file once it is triggered. This is just an example. Once I can get this functional, I can proceed to a more complicated one. But this doesn't work at all.
This is how I call the callback:
http://api.sample.com/post/12123232?callback=http://myurl.com/post/save
Is there anything that I missed here? It's also worth noting that the link above is submitted thru curl.