manipulateUrl($url); // send the result as a JSON response header('Content-Type: application/json'); echo json_encode($result); }