• 0
Sign in to follow this  
Fernando Aguirre

Nombres de dominio por pais

Question

Hola amigos.

Les comparto los diferentes nombres de dominio para los diferentes siteId de ML

$domains = array(//Array with domain names from siteId => Domain
  'MLA' => 'com.ar',//Argentina
  'MBO' => 'com.bo',//Bolivia
  'MLB' => 'com.br',//Brasil
  'MLC' => 'cl',//Chile
  'MCO' => 'com.co',//Colombia
  'MCR' => 'co.cr',//Costa Rica
  'MRD' => 'com.do',//Dominicana
  'MEC' => 'com.ec',//Ecuador
  'MHN' => 'com.hn',//Honduras
  'MGT' => 'com.gt',//Guatemala
  'MLM' => 'com.mx',//Mexico
  'MNI' => 'com.ni',//Nicaragua
  'MPY' => 'com.py',//Paraguay
  'MPA' => 'com.pa',//Panama
  'MPE' => 'com.pe',//Peru
  'MSV' => 'com.sv',//Salvador
  'MLU' => 'com.uy',//Uruguay
  'MLV' => 'com.ve'//Venezuela
);

//Como usar para dirigir al usuario a su cuenta de ML

$siteId = 'MLM';
$domain = $domains[$siteId];

$url = 'https://myaccount.mercadolibre.'.$domain;

Y claro, tienen que guardar informacion basica de su usuario en su DB, como por ejemplo el siteId, entre otros. 

De esta manera su app puede ser mas dinamica conforme a los paises donde la pueden usar, por ejemplo.

Saludos!

Edited by Fernando Aguirre

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

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

Guest
Answer this question...

×   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.

Loading...
Sign in to follow this