Ciao a tutti,
scusate ma non ricordo proprio come si fa...
Ho due pagine che si trovano in server differenti:
- pag1.php (Server 1)
- pag2.php (Server 2)
la pag1.php mi restitutisce il seguente var_dump:
Codice PHP:
array(2) {
[0]=>
array(2) {
["COUNTRY_CD"]=>
string(3) "AFG"
["COUNTRY_ENG"]=>
string(32) "Afghanistan, Islamic Republic of"
}
[1]=>
array(2) {
["COUNTRY_CD"]=>
string(3) "ALB"
["COUNTRY_ENG"]=>
string(7) "Albania"
}
}
Con pag2.php faccio:
$sPage = file_get_contents('http://server1/pag1.php');
il problema é che $sPage é una stringa invece io vorrei che fosse esattamente un array, come il var_dump di pag1.php
Come si fa? Purtroppo non ho un web services a disposizione, quindi per forza di cose devo fare cosí.
Ciao e grazie, MAX