Jump to content

Help using $serveraccesshash and $dedicatedip


BrutalGT

Recommended Posts

I just got my custom provisioning module finished up, and have a few small issues I need to address.

 

I am trying to find the value specified for "Dedicated IP" on the product page, but have not been able to find the variable for it. I am assuming I am just going to have to pull this value straight from the MySQL Database, but wanted to confirm there is nothing like $params[dedicatedip] that I am missing.

 

I have $serveraccesshash = $params["serveraccesshash"]; and have specified a setting there for my module that appears as "<site-id>1</site-id>". Is there any simple way of grabbing the value from this without manually parsing it?

 

Thanks!

Link to comment
Share on other sites

The dedicated ip isn't passed to the create module so you will need to grab it from the database.

 

You can use an XML paraser like SimpleXMLElement to get the site-id from the access hash, e.g.:

<?php
$serveraccesshash = "<site-id>1</site-id>";

$xml = new SimpleXMLElement("<xml>$serveraccesshash</xml>");

echo $xml->{'site-id'};
?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated