I am new to drupal, I have created a Drupal 7 module in sites/all/modules/edm
edm.info
name = edm
description = EDM Registration Module
package = EDM API
version = 1.0
core = 7.x
files[] = edm.module
edm.module
<?php
function edm_menu() {
$items = array();
$items['edm/send'] = array(
'title' => 'EDM Registration Module',
'page callback' => 'perform_curl_request',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
return $items;
}
function perform_curl_request() {
drupal_add_http_header('Content-Type', 'application/json; utf-8');
echo json_encode(array('result'=>'success','message','Cool! it is working');
}
When i enabled this module for one of the multisite in localhost, works fine. and i did the same for live website by uploading then enabled it. but always redirects to homepage.
the URL i used to access is
http://xxxxxxxxxx/edm/send
is there some configuration i missed or what may be the reason.
edm_perform_curl_request()- Scott Anderson