Is it safe to connect to another server to send form data? I have a standard D7 installation and I was wondering if it's safe to connect to another server to send form data. The way I see it, I'll need to make a page--&lt;path&gt;.tpl.php file and add my PHP at the very top of it. Are there any issues I should know about before doing this? Is this ok to do?

The form is for Anonymous users so no registration is required, it's just that the data needs to be sent elsewhere (another server). Yes, I've tried the Webform module but it's just not what I'm looking for. I'm thinking of using AJAX to send the data.

Any tips/suggestions before I go about this or should I just wing it? :-)
If you clear your required flow then a better solution can be suggested.

It is not a good practice to perform at page--path.tpl.php

Use hook_init in your custom module and check arg(1) to confirm your path.

Data can also be posted using drupal_http_request($server_url, $headers, 'POST', $data);