在php中重新开发Asp.net项目

Summry

I developed an application for my client in Asp.net, After using the application for couple of months my client want the same application in php because of server issues. I am sending and receiving data from client side with the help of Json and ajax to web-services in my Asp.net.

Problem

I know how to use client side code in php but have no clue what to do with services part. I mean how do I code my server side functions and use them as ajax url and example given below.

function loaddetailmodal() {
        var phid = $("#<%=HiddenField2.ClientID%>").val();
        var table = $("#getdetails");
        var d = [];
        d.push(phid);
        var jsnDta = JSON.stringify({ d: d });
        $.ajax({
            type: "POST",
            url: "wbservices/LoadRequestDetailsInAddDetailModal.asmx/loadrequestdetails",
            data: jsnDta,
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (r) {


                var rtnData = r.d; //all returned data...
                var respDta = [];
                $.map(rtnData, function (item, index) {
                    var j = [
                        item.status,
                        item.msg,

                    ];
                    respDta.push(j);

                });

                $.each(respDta, function (key, value) {
                    var status = value[0];
                    var msg = value[1];


                    if (status == true) {

                        table.html(msg);

                    } else {

                        table.html(msg);

                    }

                }); //1st out loop ends here...


            },
            error: function (jqXHR, textStatus, errorThrown) {
                //  $("#responseMovDetails").html(jqXHR + textStatus + errorThrown);
                alert("error while loading Records of Requests" + jqXHR + textStatus + errorThrown);

            }

        });
    }