On 26 February 2013 15:48, RICHARD O. <[email protected]> wrote:

> Hello!
>
> I have problems integrating enom's TLDs portal in my site.
>
> It was needed that every client visiting the portal on my site should pull
> a
> token authomatically to be able to login.
>
> The widget is
>
> <div id="tldportal-root"></div>
>
> <script
> src='
> http://tldportal.com/api/embed?token={61575B5652535307524F550404504F565
> A07574F030354064F5B52530155565B50575B06511E1
>
>
>
>
> 61007031117101B111B1116070F1122050F030B0E4C010D0F1E534D574D50525351425353585
> 1
>
>
>
> 5A58565642322F1E53}'type="text/javascript">
>
> </script>
>
>
>
> So I was now asked to find a help using the suggestions below:
>
>
>
>
>
> $TOKEN = '';
> $postfields = array();
> $postfields['embeded'] = "1";
> $postfields['uid'] = 'resellerdemo';
> $postfields['pw'] = 'resellerdemo';
> $postfields['portaluserid'] = 'MY-Logged-In-User-ID';
> $postfields['email'] = ' <mailto:[email protected]>
> [email protected]';
> $postfields['command'] = "PORTAL_GETTOKEN";
> $postfields['responsetype'] = "XML";
>
> $query_string = "";
> foreach ($postfields AS $k=>$v)
> $query_string .= "$k=".urlencode($v)."&";
>
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL, '
> <https://resellertest.enom.com/interface.asp')>
> https://resellertest.enom.com/interface.asp');
> curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string);
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
> curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
> curl_setopt($ch, CURLOPT_TIMEOUT, 100);
> $data = curl_exec($ch);
> if (curl_error($ch)) {
> echo "CURL Error: ".curl_errno($ch)." - ".curl_error($ch);
> }
>
> curl_close ($ch);
> $xmldata = simplexml_load_string($data);
> $TOKEN = $xmldata->{'token'};
>
> ?>
> <!-- START WATCHLIST --> <div id="tldportal-root"></div> <script
> src="https://tldportal.com/api/embed?token=<?php echo $TOKEN;?>"
> type="text/javascript"></script> <!-- END WATCHLIST -->
> </body> </html>
>
>
>
>
>
> I wish you have such time here in this community to look into such
> problems.
>
>
>
> Thanks.
>
>
>
> Richard O. Absilim
>
>
Hi Richard,

Thanks for the email.  Unfortunately this list is for work related to
maintaining the php.net website, amongst other things, but it is not a
support channel.

You may have more luck here: http://php.net/support.php

-- 

Mike Griffiths

[email protected]

Reply via email to