siavashsay
چهارشنبه 20 اسفند 1393, 10:19 صبح
با سلام !
بنده توسط تابع cURL یک سری اطلاعات رو از یک آدرس میگیرم که اون اطلاعات توسط JSON داره به بنده بازگردونده میشه !
نمونه اطلاعات JSON داده شده به این شکل هست :
{ "links": [
{ "title": "Buy ", "description": "", "slug": "buy", "shorturl": "http://xxx.x", "url": "http://xxx.x", "cover_image": null, "currency": "USD", "base_price": "100.00", "quantity": null, "quantity_sold": 0, "requires_shipping": false, "ships_within_days": null, "start_date": null, "end_date": null, "venue": null, "timezone": null, "note": "", "redirect_url": "", "webhook_url": "", "status": "Live", "enable_pwyw": true, "enable_sign": false },
{ "title": "SFPP", "description": "", "slug": "buy-it", "shorturl": "http://xxx.x", "url": "http://xxx.x", "cover_image": null, "currency": "USD", "base_price": "1999.00", "quantity": null, "quantity_sold": 0, "requires_shipping": true, "ships_within_days": 3, "start_date": null, "end_date": null, "venue": null, "timezone": null, "note": "Thank you for your purchase! Get excited for rocking your dating life!", "redirect_url": "http://xxx.x", "webhook_url": "", "status": "Live", "enable_pwyw": false, "enable_sign": false }
],
"success": true
}
حالا بنده میخوام اطلاعات مربوط به هر کدوم رو دریافت کنم !
مثلا محتوی title ها رو میخوام بگیرم و در یک متغیر PHP بذارم !
چطور باید اینکارو بکنم !
متشکرم
بنده توسط تابع cURL یک سری اطلاعات رو از یک آدرس میگیرم که اون اطلاعات توسط JSON داره به بنده بازگردونده میشه !
نمونه اطلاعات JSON داده شده به این شکل هست :
{ "links": [
{ "title": "Buy ", "description": "", "slug": "buy", "shorturl": "http://xxx.x", "url": "http://xxx.x", "cover_image": null, "currency": "USD", "base_price": "100.00", "quantity": null, "quantity_sold": 0, "requires_shipping": false, "ships_within_days": null, "start_date": null, "end_date": null, "venue": null, "timezone": null, "note": "", "redirect_url": "", "webhook_url": "", "status": "Live", "enable_pwyw": true, "enable_sign": false },
{ "title": "SFPP", "description": "", "slug": "buy-it", "shorturl": "http://xxx.x", "url": "http://xxx.x", "cover_image": null, "currency": "USD", "base_price": "1999.00", "quantity": null, "quantity_sold": 0, "requires_shipping": true, "ships_within_days": 3, "start_date": null, "end_date": null, "venue": null, "timezone": null, "note": "Thank you for your purchase! Get excited for rocking your dating life!", "redirect_url": "http://xxx.x", "webhook_url": "", "status": "Live", "enable_pwyw": false, "enable_sign": false }
],
"success": true
}
حالا بنده میخوام اطلاعات مربوط به هر کدوم رو دریافت کنم !
مثلا محتوی title ها رو میخوام بگیرم و در یک متغیر PHP بذارم !
چطور باید اینکارو بکنم !
متشکرم