Calling web service on page load Until now I'm calling a web service with using specific function like hook_user_logout, _validate, _submit..., but now I need to create a page that will display details that I'll receive results from the web service, but I don't know how to call when I enter lets say user/%/reports.

Also on that page there will be a link that will display more details that will come from the webservice.

Is there a function for page load, url open or something similar in Drupal 7?

Here's my part of the code when a user logouts.

&lt;?php

function mymodyle_user_logout($account) {

    global $user;

    $username = $user -&gt; name;
    $ip_address = $_SERVER["REMOTE_ADDR"];
    $session_id = session_id();

    $xml_string = '&lt;some_method&gt;
       &lt;username&gt;' . $username . '&lt;/username&gt;
       &lt;ip_address&gt;' . $ip_address . '&lt;/ip_address&gt;
       &lt;session_id&gt;' . $session_id . '&lt;/session_id&gt;
       &lt;language&gt;en&lt;/language&gt;
       &lt;/some_method&gt;';

    $client = new nusoap_client('http://10.10.60.80:8090/CardHolderAuthentication.asmx?wsdl',  array('soap_version' =&gt; SOAP_1_1, 'trace' =&gt; 1, 'exeptions' =&gt; true));
    $client -&gt; soap_defencoding = 'UTF-8';
    $client -&gt; decode_utf8 = FALSE;

    $result = $client -&gt; call('Logout', array('_xml' =&gt; $xml_string));

    //$response = simplexml_load_string($result['LogoutResult']);

    //$status = $response -&gt; error-&gt;descr_bg;

}
If the page content needs to be fetched via an API request, you can use

hook_menu

to define a URL path to function callback to generate the page content.

Basically your own path to the content.

The page callback will fetch the API response from cache or perform the request, cache the response and display it.