How To Use Api?

Hello,

I am looking for help.

I am using CS-CART API using PHP curl form outside.

$username='xxxx@xxxxxxxxxxxx.com';
$password='TSw5a0YQ2eTSJk89O62y6i4XXjn40D9u';
$URL='http://citytech.mage.com/sewpersonalgifts/api.php?_d=:categories&ajax_custom=1';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$URL);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); //get status code
$result=curl_exec ($ch);
curl_close ($ch);
print_r($result);
OUTPUT

Page Not Found

We cannot locate the page you're looking for. Please check the address and make sure all letters are lowercased with no spaces.

Thank you in advance.

Thank you.

Are you sure that the correct URL is used? We receive the same error if the URLs are used in the browser:

http://citytech.mage.com/sewpersonalgifts/api.php

http://citytech.mage.com/sewpersonalgifts

http://citytech.mage.com

Hello,

Thank you for your reply.

Actually I am using localhost as a

My requirement is i will call API page using PHP CURL and get response in json or XML.

Thank you in advance.

Thank you.