Author Topic: 3rd party server posting problems  (Read 1667 times)

agm

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
3rd party server posting problems
« on: February 13, 2014, 12:14:50 AM »
I want to post the energy data from TED to a server. I have the activation file in .xml format as given in the instructions, in my server. However the TED was able to access it once and the activation got disconnected and now when I try to activate the 3rd part posting with the activation url and unique identifier, it says TED cannot connect to the 3rd party server. The http://ted5000/stats.htm page says I have a 301 error. I have tried reconnecting it several times with no success. I got a 100 error few times.But, its mainly a 301 error which is a redirection error. I'm not too sure why I'm getting that error and how it can be sorted out. I know the act.xml file is there in the server and visible because I can access it via its url. It'll be really helpful if someone can help me out!

activation url : www.aaaaa.com/act.xml ( sample domain name. I have used the real domain name during activation)
unique identifier : 12345 ( some random number)

This is my act.xml
<?xml version="1.0"?>
<ted500ActivationResponse>
 <PostServer>www.aaaaa.com</PostServer>
 <PostURL>www.aaaaa.com/postData.php</PostURL>
 <UseSSL>F</UseSSL>
 <PostPort>80</PostPort>
 <AuthToken>12345</AuthToken>
 <PostRate>1</PostRate>
 <SSLKey>NOT IMPLEMENTED</SSLKey>
</ted500ActivationResponse>

This is my php

<?php
date_default_timezone_set('America/Chicago');

$outp = fopen("output." . date("YmdHis") . ".xml", "w");
fwrite($outp, $HTTP_RAW_POST_DATA);
fclose($outp);

?>

 Since I'm posting data to a remote server and there are chances that $HTTP_RAW_POST_DATA might not be recognized, I also tried
<?php
date_default_timezone_set('America/Chicago');

$outp = fopen("output." . date("YmdHis") . ".xml", "w");
fwrite($outp, file_get_contents("php://input"));
fclose($outp);

?>

Also, what's the difference between the unique identifier on the 3rd party activation menu in TED and the AuthToken in act.xml? Should both of them be the same?
« Last Edit: February 13, 2014, 01:18:25 AM by agm »