I want to send URL's string via PHP (this must return a JSON), but I guess there is an encoding issue.
I use file_get_contents("php://input") in my PHP to get the string of this URL, but it's impossible. This code is working when I am sending a JSON to PHP. Is there an encoding problem?
var urlString='https://google.com';
$.ajax({
type : 'POST',
url : 'https://example.php',
//contentType: 'application/json',
data: urlString , //I want to send this
dataType: 'json'
});