Duyuruyu Kapat
Facebook Gözat
Twitter Gözat

Php Json Yardım

Konu, 'PHP' kısmında check54 tarafından paylaşıldı.

  1. check54

    check54 Üye

    Kayıt:
    14 Ekim 2011
    Mesajlar:
    87
    Beğenilen Mesajlar:
    0
    {
    "streams": [
    {
    "index": 0,
    "codec_name": "h264",
    "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
    "profile": "Main",
    "codec_type": "video",
    "codec_time_base": "1/48",
    "codec_tag_string": "[0][0][0][0]",
    "codec_tag": "0x0000",
    "width": 1920,
    "height": 804,
    "coded_width": 1920,
    "coded_height": 804,
    "has_b_frames": 0,
    "sample_aspect_ratio": "1:1",
    "display_aspect_ratio": "160:67",
    "pix_fmt": "yuv420p",
    "level": 40,
    "chroma_location": "left",
    "field_order": "progressive",
    "refs": 1,
    "is_avc": "true",
    "nal_length_size": "4",
    "r_frame_rate": "24/1",
    "avg_frame_rate": "24/1",
    "time_base": "1/1000",
    "start_pts": 0,
    "start_time": "0.000000",
    "bits_per_raw_sample": "8",
    "disposition": {
    "default": 1,
    "dub": 0,
    "original": 0,
    "comment": 0,
    "lyrics": 0,
    "karaoke": 0,
    "forced": 0,
    "hearing_impaired": 0,
    "visual_impaired": 0,
    "clean_effects": 0,
    "attached_pic": 0,
    "timed_thumbnails": 0
    },
    "tags": {
    "BPS": "2045897",
    "BPS-eng": "2045897",
    "DURATION": "01:57:46.792000000",
    "DURATION-eng": "01:57:46.792000000",
    "NUMBER_OF_FRAMES": "169603",
    "NUMBER_OF_FRAMES-eng": "169603",
    "NUMBER_OF_BYTES": "1807241855",
    "NUMBER_OF_BYTES-eng": "1807241855",
    "_STATISTICS_WRITING_APP": "mkvmerge v14.0.0 ('Flow') 64bit",
    "_STATISTICS_WRITING_APP-eng": "mkvmerge v14.0.0 ('Flow') 64bit",
    "_STATISTICS_WRITING_DATE_UTC": "2017-12-22 17:52:25",
    "_STATISTICS_WRITING_DATE_UTC-eng": "2017-12-22 17:52:25",
    "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES",
    "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
    }
    },
    {
    "index": 1,
    "codec_name": "ac3",
    "codec_long_name": "ATSC A/52A (AC-3)",
    "codec_type": "audio",
    "codec_time_base": "1/48000",
    "codec_tag_string": "[0][0][0][0]",
    "codec_tag": "0x0000",
    "sample_fmt": "fltp",
    "sample_rate": "48000",
    "channels": 6,
    "channel_layout": "5.1(side)",
    "bits_per_sample": 0,
    "dmix_mode": "-1",
    "ltrt_cmixlev": "-1.000000",
    "ltrt_surmixlev": "-1.000000",
    "loro_cmixlev": "-1.000000",
    "loro_surmixlev": "-1.000000",
    "r_frame_rate": "0/0",
    "avg_frame_rate": "0/0",
    "time_base": "1/1000",
    "start_pts": 0,
    "start_time": "0.000000",
    "bit_rate": "384000",
    "disposition": {
    "default": 1,
    "dub": 0,
    "original": 0,
    "comment": 0,
    "lyrics": 0,
    "karaoke": 0,
    "forced": 0,
    "hearing_impaired": 0,
    "visual_impaired": 0,
    "clean_effects": 0,
    "attached_pic": 0,
    "timed_thumbnails": 0
    },
    "tags": {
    "language": "tur",
    "title": "www.limitsizamca.net",
    "BPS": "384000",
    "BPS-eng": "384000",
    "DURATION": "01:57:46.784000000",
    "DURATION-eng": "01:57:46.784000000",
    "NUMBER_OF_FRAMES": "220837",
    "NUMBER_OF_FRAMES-eng": "220837",
    "NUMBER_OF_BYTES": "339205632",
    "NUMBER_OF_BYTES-eng": "339205632",
    "_STATISTICS_WRITING_APP": "mkvmerge v14.0.0 ('Flow') 64bit",
    "_STATISTICS_WRITING_APP-eng": "mkvmerge v14.0.0 ('Flow') 64bit",
    "_STATISTICS_WRITING_DATE_UTC": "2017-12-22 17:52:25",
    "_STATISTICS_WRITING_DATE_UTC-eng": "2017-12-22 17:52:25",
    "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES",
    "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
    }
    },
    {
    "index": 2,
    "codec_name": "ac3",
    "codec_long_name": "ATSC A/52A (AC-3)",
    "codec_type": "audio",
    "codec_time_base": "1/48000",
    "codec_tag_string": "[0][0][0][0]",
    "codec_tag": "0x0000",
    "sample_fmt": "fltp",
    "sample_rate": "48000",
    "channels": 2,
    "channel_layout": "stereo",
    "bits_per_sample": 0,
    "dmix_mode": "-1",
    "ltrt_cmixlev": "-1.000000",
    "ltrt_surmixlev": "-1.000000",
    "loro_cmixlev": "-1.000000",
    "loro_surmixlev": "-1.000000",
    "r_frame_rate": "0/0",
    "avg_frame_rate": "0/0",
    "time_base": "1/1000",
    "start_pts": 0,
    "start_time": "0.000000",
    "bit_rate": "192000",
    "disposition": {
    "default": 0,
    "dub": 0,
    "original": 0,
    "comment": 0,
    "lyrics": 0,
    "karaoke": 0,
    "forced": 0,
    "hearing_impaired": 0,
    "visual_impaired": 0,
    "clean_effects": 0,
    "attached_pic": 0,
    "timed_thumbnails": 0
    },
    "tags": {
    "language": "eng",
    "title": "www.limitsizamca.net",
    "BPS": "192000",
    "BPS-eng": "192000",
    "DURATION": "01:57:46.784000000",
    "DURATION-eng": "01:57:46.784000000",
    "NUMBER_OF_FRAMES": "220837",
    "NUMBER_OF_FRAMES-eng": "220837",
    "NUMBER_OF_BYTES": "169602816",
    "NUMBER_OF_BYTES-eng": "169602816",
    "_STATISTICS_WRITING_APP": "mkvmerge v14.0.0 ('Flow') 64bit",
    "_STATISTICS_WRITING_APP-eng": "mkvmerge v14.0.0 ('Flow') 64bit",
    "_STATISTICS_WRITING_DATE_UTC": "2017-12-22 17:52:25",
    "_STATISTICS_WRITING_DATE_UTC-eng": "2017-12-22 17:52:25",
    "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES",
    "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
    }
    },
    {
    "index": 3,
    "codec_name": "subrip",
    "codec_long_name": "SubRip subtitle",
    "codec_type": "subtitle",
    "codec_time_base": "0/1",
    "codec_tag_string": "[0][0][0][0]",
    "codec_tag": "0x0000",
    "r_frame_rate": "0/0",
    "avg_frame_rate": "0/0",
    "time_base": "1/1000",
    "start_pts": 0,
    "start_time": "0.000000",
    "duration_ts": 7066792,
    "duration": "7066.792000",
    "disposition": {
    "default": 1,
    "dub": 0,
    "original": 0,
    "comment": 0,
    "lyrics": 0,
    "karaoke": 0,
    "forced": 1,
    "hearing_impaired": 0,
    "visual_impaired": 0,
    "clean_effects": 0,
    "attached_pic": 0,
    "timed_thumbnails": 0
    },
    "tags": {
    "language": "tur",
    "title": "FORCED",
    "BPS": "2",
    "BPS-eng": "2",
    "DURATION": "01:56:54.000000000",
    "DURATION-eng": "01:56:54.000000000",
    "NUMBER_OF_FRAMES": "89",
    "NUMBER_OF_FRAMES-eng": "89",
    "NUMBER_OF_BYTES": "2022",
    "NUMBER_OF_BYTES-eng": "2022",
    "_STATISTICS_WRITING_APP": "mkvmerge v14.0.0 ('Flow') 64bit",
    "_STATISTICS_WRITING_APP-eng": "mkvmerge v14.0.0 ('Flow') 64bit",
    "_STATISTICS_WRITING_DATE_UTC": "2017-12-22 17:52:25",
    "_STATISTICS_WRITING_DATE_UTC-eng": "2017-12-22 17:52:25",
    "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES",
    "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
    }
    },
    {
    "index": 4,
    "codec_name": "subrip",
    "codec_long_name": "SubRip subtitle",
    "codec_type": "subtitle",
    "codec_time_base": "0/1",
    "codec_tag_string": "[0][0][0][0]",
    "codec_tag": "0x0000",
    "r_frame_rate": "0/0",
    "avg_frame_rate": "0/0",
    "time_base": "1/1000",
    "start_pts": 0,
    "start_time": "0.000000",
    "duration_ts": 7066792,
    "duration": "7066.792000",
    "disposition": {
    "default": 0,
    "dub": 0,
    "original": 0,
    "comment": 0,
    "lyrics": 0,
    "karaoke": 0,
    "forced": 0,
    "hearing_impaired": 0,
    "visual_impaired": 0,
    "clean_effects": 0,
    "attached_pic": 0,
    "timed_thumbnails": 0
    },
    "tags": {
    "language": "tur",
    "title": "TAM",
    "BPS": "50",
    "BPS-eng": "50",
    "DURATION": "01:56:53.542000000",
    "DURATION-eng": "01:56:53.542000000",
    "NUMBER_OF_FRAMES": "1602",
    "NUMBER_OF_FRAMES-eng": "1602",
    "NUMBER_OF_BYTES": "44059",
    "NUMBER_OF_BYTES-eng": "44059",
    "_STATISTICS_WRITING_APP": "mkvmerge v14.0.0 ('Flow') 64bit",
    "_STATISTICS_WRITING_APP-eng": "mkvmerge v14.0.0 ('Flow') 64bit",
    "_STATISTICS_WRITING_DATE_UTC": "2017-12-22 17:52:25",
    "_STATISTICS_WRITING_DATE_UTC-eng": "2017-12-22 17:52:25",
    "_STATISTICS_TAGS": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES",
    "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES"
    }
    }
    ]
    }

    $json = json_decode($checkstreamurl, true);
    foreach ($jsons->streams as $data) {
    echo $data->codec_name.;
    }

    tags bölümlerini okumam lazım yardımıcı olurmusunuz
     
  2. deathisonitsway

    deathisonitsway x-coder

    Kayıt:
    7 Kasım 2007
    Mesajlar:
    6,145
    Beğenilen Mesajlar:
    6
    Meslek:
    php-coder
    Şehir:
    abroad
    PHP:

    echo json_decode($jsonData,1);