Rest api - Adding new Lead from PHP

I tried to use web client. I can execute the get successfully. I am having hard time inserting the lead using API. I am getting 404. Not sure what i am missing here.

I have used the following PHP client.

https://github.com/tmimori/FrappeClient-PHP/blob/master/FrappeClient.php

And in sample.php i have passed following parameters.

$result = $client->insert(
“Lead”
,array(
“lead_name” => “aaa”,
“company_name” => “aaa”,
“email_id” => “aaa@gmail.com”,

                        "status" => "aaa",         
                        "source" => "aaa",    
              
                        "lead_owner" => "aaa",          
                                
                        "contact_by" => "aaa",    
                        "contact_date" =>"23-11-2015 15:41:00" ,    

                        "phone" => 123456,        
                        "mobile_no" => 9726133493,     
                        "fax" => 123456,        
                        "website" => "www.online.com",        
                        "territory" => "india",     
                )
            );

var_dump($result);

Any input will be much helpful

I haven’t used this library but I guess @rydersaint has.

Anyways, AFAIK, there’s an option to call curl with verbose in php, can you edit that and post the output?