高さと幅が >= 何かの場合にソース値を取得する方法
私の仕事: Facebook グラフ API を使用してこれらの値を取得します.. json オブジェクトとしての出力.. それは問題ではありません。
または、Facebookグラフで条件を与えることが可能であれば、より簡単になります
私のコード:
$url = "https://graph.facebook.com/{$this->post[id]}?fields=images&access_token={$this->user->token}";
$url = file_get_contents($url);
$link = (array)json_decode($url);
ソース値を取得したいと考えており、その高さは > 420 である必要があります...
Array
(
[images] => Array
(
[0] => stdClass Object
(
[height] => 1152
[width] => 2048
[source] => https://sphotos-b.xx.fbcdn.net/hphotos-snc6/256375_463526207001195_392636722_o.jpg
)
[1] => stdClass Object
(
[height] => 540
[width] => 960
[source] => https://sphotos-b.xx.fbcdn.net/hphotos-ash4/427440_463526207001195_392636722_n.jpg
)
[2] => stdClass Object
(
[height] => 405
[width] => 720
[source] => https://sphotos-b.xx.fbcdn.net/hphotos-ash4/s720x720/427440_463526207001195_392636722_n.jpg
)
[3] => stdClass Object
(
[height] => 337
[width] => 600
[source] => https://sphotos-b.xx.fbcdn.net/hphotos-ash4/s600x600/427440_463526207001195_392636722_n.jpg
)
[4] => stdClass Object
(
[height] => 270
[width] => 480
[source] => https://sphotos-b.xx.fbcdn.net/hphotos-ash4/s480x480/427440_463526207001195_392636722_n.jpg
)
[5] => stdClass Object
(
[height] => 180
[width] => 320
[source] => https://sphotos-b.xx.fbcdn.net/hphotos-ash4/s320x320/427440_463526207001195_392636722_n.jpg
)
[6] => stdClass Object
(
[height] => 101
[width] => 180
[source] => https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/427440_463526207001195_392636722_a.jpg
)
[7] => stdClass Object
(
[height] => 73
[width] => 130
[source] => https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/427440_463526207001195_392636722_s.jpg
)
[8] => stdClass Object
(
[height] => 73
[width] => 130
[source] => https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/s75x225/427440_463526207001195_392636722_s.jpg
)
)
[id] => 463526207001195
[created_time] => 2012-08-19T16:22:21+0000
)