|
|
# 7 | |
|
עסק רשום [?]
|
ציטוט:
הכנסתי את הכול לתוך הלולאה וזה עדיין לא פועל. די בטוח שזה אפשרי קוד:
$textarea = $_POST ["textarea"];
$codes = explode ("\r\n", $textarea);
$i = 0;
foreach ($codes as $code){
$i++;
echo "No. {$i}: {$code}<br/>";
$itemType = substr( $code, 0, 2 ) . substr( $code, -2 );
$url = "http://www.israelpost.co.il/itemtrace.nsf/trackandtraceJSON?openagent&_=1412972965324&lang=HE&itemcode={$code}&sKod2={$itemType}";
$json = file_get_contents($url);
$obj = json_decode($json);
echo $obj->{'itemcodeinfo'};
}
Last edited by Eyale; 23-10-15 at 14:30.. |
|
|
| חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|