I need to know the difference between CURL (in PHP) and AJAX (in Javascript) when it comes to know Source of the request.
UPDATED: What I want to know i
If you're trying to detect which method was used as the source of a request, there is no way to know for sure. Most browsers use the HTTP header X-Requested-With when sending a request via AJAX. The cURL library does send a user agent by default, but this can obviously be altered by the library. Both methods can be forged easily and should not be used for strict validation.
Edit:
The AJAX request will come from client that made the AJAX request. The cURL request will come from where the library was used. (e.g. if you're using PHP, it will come from the PHP server. If you're using it via CLI, then it will come from the server you executed the command from)
Obviously the requests could be behind proxies, etc.