inVINCEable Posted August 15, 2011 Share Posted August 15, 2011 I have a fairly complicated set of flash vars in my HTML meaning it is a few thousand characters. I was just wondering if there is a PHP Library or some function that can break down the different variables automatically. I know I could do some regex but that could get complicated very quickly, I was just wondering if there was an easier way to go about it, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/244844-flashvars-library/ Share on other sites More sharing options...
Adam Posted August 15, 2011 Share Posted August 15, 2011 We need to know more. How would using PHP help? How would you "break down the different variables" exactly? Unless you can explain it in English, you won't have a chance at implementing a PHP solution. Quote Link to comment https://forums.phpfreaks.com/topic/244844-flashvars-library/#findComment-1257760 Share on other sites More sharing options...
inVINCEable Posted August 15, 2011 Author Share Posted August 15, 2011 I have a flashvars attribute that looks like this: flashvars="ptk=TheStation%252Buser&enablecsi=1&iv_close_button=0&mpvid=AASqkn3jdebiFvtN&hl=en_US&autohide=3&csi_page_type=watch5ad&keywords=Timothydelaghetto%2Cmichellemartinez%2Ckatrinalynnenorman%2Ccrushin%2Cmusicvideo%2Ccalifornia%2Cloasngeles%2Cglee3d%2Cglee%2Cdance%2Cquestcrew%2Cvictorkim%2Ccrushinmusicvideo%2Ctraphik&cr=US&host_language=en&iv3_module=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswfbin%2Fiv3_module-vflWlNhJk.swf&no_get_video_log=1&fmt_list=45%2F1280x720%2F99%2F0%2F0%2C22%2F1280x720%2F9%2F0%2F115%2C44%2F854x480%2F99%2F0%2F0%2C35%2F854x480%2F9%2F0%2F115%2C43%2F640x360%2F99%2F0%2F0%2C34%2F640x360%2F9%2F0%2F115%2C18%2F640x360%2F9%2F0%2F115%2C5%2F320x240%2F7%2F0%2F0&iv_storage_server=http%3A%2F%2Fwww.google.com%2Freviews%2Fy%2F&iv_storage_server_html5=http%3A%2F%2Fwww.withsite.com%2Fapi%2Freviews%2Fy%2F&targeting_video_doc_id=&trueview=True&theme=dark&invideo=True&ad_preroll=1&tk=cqOuEOxgM6ens8SmBgAmEkx5-0tkLzThot9cFHUc0EefOE3Ghi22sw%3D%3D&sffb=True&ad_channel_code_instream=afv_instream%2Cafv_instream_shortform%2Cafv_instream_shortform_Entertainment%2Cafv_instream_us%2Cafv_user_timothydelaghetto2%2Cytps_default%2Cytel_detailpage%2Cyt_mpvid_AASqkn3jdebiFvtN%2Cyt_cid_12045&sdetail=f%3Atopvideos_entertainment%2Cp%3A%2F&cafe_experiment_id=&sourceid=y×tamp=1313446060&iv_load_policy=1&ad_host=ca-host-pub-4184977541492624&ad_eurl=http%3A%2F%2Fwww.withsite.com%2Fvideo%2Fry_C69Pdc38&showpopout=1&mpu=True&url_encoded_fmt_stream_map=url%3Dhttp%253A%252F%252Fo-o.preferred.iad09s05.v12.lscache4.c.withsite.com%252Fvideoplayback%253Fsparams%253Did%25252Cexpire%25252Cip%25252Cipbits%25252Citag%25252Cratebypass%25252Coc%25253AU0hQSFRSTl9FSkNOMF9MTFJJ%2526itag%253D45%2526ip%253D0.0.0.0%2526signature%253DC50303682A174068058DF12246AF3AADECA8F611.4239F165E34E482B59AE1A42EAF79C41D1F9DE0B%2526sver%253D3%2526ratebypass%253Dyes%2526expire%253D1313470800%2526key%253Dyt1%2526ipbits%253D0%2526id%253Daf2fc2ebd3dd737f%26quality%3Dhd720%26fallback_host%3Dtc.v12.cache4.c.withsite.com%26type%3Dvideo%252Fwebm%253B%2Bcodecs%253D%2522vp8.0%252C%2Bvorbis%2522%26itag%3D45%2Curl%3Dhttp%253A%252F%252Fo-o.preferred.iad09s05.v2.lscache4.c.withsite.com%252Fvideoplayback%253Fsparams%253Did%25252Cexpire%25252Cip%25252Cipbits%25252Citag%25252Cratebypass%25252Coc%25253AU0hQSFRSTl9FSkNOMF9MTFJJ%2526itag%253D22%2526ip%253D0.0.0.0%2526signature%253DB1E13484F0A5F0F9DF54A187EEC47C121A2028B8.0FA094E0C0D283829002A38E2E43CA5FD44214EB%2526sver%253D3%2526ratebypass%253Dyes%2526expire%253D1313470800%2526key%253Dyt1%2526ipbits%253D0%2526id%253Daf2fc2ebd3dd737f%26quality%3Dhd720%26fallback_host%3Dtc.v2.cache4.c.withsite.com%26type%3Dvideo%252Fmp4%253B%2Bcodecs%253D%2522avc1.64001F%252C%2Bmp4a.40.2%2522%26itag%3D22%2Curl%3Dhttp%253A%252F%252Fo-o.preferred.iad09s05.v15.lscache7.c.withsite.com%252Fvideoplayback%253Fsparams%253Did%25252Cexpire%25252Cip%25252Cipbits%25252Citag%25252Cratebypass%25252Coc%25253AU0hQSFRSTl9FSkNOMF9MTFJJ%2526itag%253D44%2526ip%253D0.0.0.0%2526signature%253DBAB422646BDC975891CD16A98884E77EA894C2EE.1525AEA36DECD9C990EE5EC882556AA464938EC0%2526sver%253D3%2526ratebypass%253Dyes%2526expire%253D1313470800%2526key%253Dyt1%2526ipbits%253D0%2526id%253Daf2fc2ebd3dd737f%26quality%3Dlarge%26fallback_host%3Dtc.v15.cache7.c.withsite.com%26type%3Dvideo%252Fwebm%253B%2Bcodecs%253D%2522vp8.0%252C%2Bvorbis%2522%26itag%3D44%2Curl%3Dhttp%253A%252F%252Fo-o.preferred.iad09s05.v24.lscache5.c.withsite.com%252Fvideoplayback%253Fsparams%253Did%25252Cexpire%25252Cip%25252Cipbits%25252Citag%25252Calgorithm%25252Cburst%25252Cfactor%25252Coc%25253AU0hQSFRSTl9FSkNOMF9MTFJJ%2526algorithm%253Dthrottle-factor%2526itag%253D35%2526ip%253D0.0.0.0%2526burst%253D40%2526sver%253D3%2526signature%253D43A3196174EF169FE09ECD5AEDDFF62CE4B5E761.6BD00C66230185FEE1C65CCE36F63068CFBAF28E%2526expire%253D1313470800%2526key%253Dyt1%2526ipbits%253D0%2526factor%253D1.25%2526id%253Daf2fc2ebd3dd737f%26quality%3Dlarge%26fallback_host%3Dtc.v24.cache5.c.withsite.com%26type%3Dvideo%252Fx-flv%26itag%3D35%2Curl%3Dhttp%253A%252F%252Fo-o.preferred.iad09s05.v8.lscache2.c.withsite.com%252Fvideoplayback%253Fsparams%253Did%25252Cexpire%25252Cip%25252Cipbits%25252Citag%25252Cratebypass%25252Coc%25253AU0hQSFRSTl9FSkNOMF9MTFJJ%2526itag%253D43%2526ip%253D0.0.0.0%2526signature%253DB0E381AF649D79C4E5B4B4E1782CD2A4669E435F.5597144C164373D1692EF2C4F75189452970921A%2526sver%253D3%2526ratebypass%253Dyes%2526expire%253D1313470800%2526key%253Dyt1%2526ipbits%253D0%2526id%253Daf2fc2ebd3dd737f%26quality%3Dmedium%26fallback_host%3Dtc.v8.cache2.c.withsite.com%26type%3Dvideo%252Fwebm%253B%2Bcodecs%253D%2522vp8.0%252C%2Bvorbis%2522%26itag%3D43%2Curl%3Dhttp%253A%252F%252Fo-o.preferred.iad09s05.v20.lscache7.c.withsite.com%252Fvideoplayback%253Fsparams%253Did%25252Cexpire%25252Cip%25252Cipbits%25252Citag%25252Calgorithm%25252Cburst%25252Cfactor%25252Coc%25253AU0hQSFRSTl9FSkNOMF9MTFJJ%2526algorithm%253Dthrottle-factor%2526itag%253D34%2526ip%253D0.0.0.0%2526burst%253D40%2526sver%253D3%2526signature%253D0EE595AED7E02D9258F797A9C65A4D32E8335D61.A388AAEC2E5A2015827D940BCEE010A299D08516%2526expire%253D1313470800%2526key%253Dyt1%2526ipbits%253D0%2526factor%253D1.25%2526id%253Daf2fc2ebd3dd737f%26quality%3Dmedium%26fallback_host%3Dtc.v20.cache7.c.withsite.com%26type%3Dvideo%252Fx-flv%26itag%3D34%2Curl%3Dhttp%253A%252F%252Fo-o.preferred.iad09s05.v19.lscache2.c.withsite.com%252Fvideoplayback%253Fsparams%253Did%25252Cexpire%25252Cip%25252Cipbits%25252Citag%25252Cratebypass%25252Coc%25253AU0hQSFRSTl9FSkNOMF9MTFJJ%2526itag%253D18%2526ip%253D0.0.0.0%2526signature%253D9BD9CD417FDB8B503CE349EBD9A58ECAEEAC4FC3.3F8943149DDC236B1EE3865510CB4736D6B89C10%2526sver%253D3%2526ratebypass%253Dyes%2526expire%253D1313470800%2526key%253Dyt1%2526ipbits%253D0%2526id%253Daf2fc2ebd3dd737f%26quality%3Dmedium%26fallback_host%3Dtc.v19.cache2.c.withsite.com%26type%3Dvideo%252Fmp4%253B%2Bcodecs%253D%2522avc1.42001E%252C%2Bmp4a.40.2%2522%26itag%3D18%2Curl%3Dhttp%253A%252F%252Fo-o.preferred.iad09s05.v9.lscache8.c.withsite.com%252Fvideoplayback%253Fsparams%253Did%25252Cexpire%25252Cip%25252Cipbits%25252Citag%25252Calgorithm%25252Cburst%25252Cfactor%25252Coc%25253AU0hQSFRSTl9FSkNOMF9MTFJJ%2526algorithm%253Dthrottle-factor%2526itag%253D5%2526ip%253D0.0.0.0%2526burst%253D40%2526sver%253D3%2526signature%253D540D699832D9E30FD784211A3F654378EE709AB9.443A2FE0A3F46FB6582D8AFBB820EF42749C9026%2526expire%253D1313470800%2526key%253Dyt1%2526ipbits%253D0%2526factor%253D1.25%2526id%253Daf2fc2ebd3dd737f%26quality%3Dsmall%26fallback_host%3Dtc.v9.cache8.c.withsite.com%26type%3Dvideo%252Fx-flv%26itag%3D5&iv_module=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswfbin%2Fiv_module-vflSaNpR_.swf&iv_logging_level=3&ad_flags=0&endscreen_module=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswfbin%2Fendscreen-vflQSpCcW.swf&cid=12045&referrer=http%3A%2F%2Fwww.withsite.com%2F&afv_instream_max=15000&ad_logging_flag=1&t=vjVQa1PpcFMEtQtHQ50gzWe1VF673iDVVx4yQFUGImQ%3D&instream=True&aftv=True&shortform=True&creator=TimothyDeLaGhetto2&allow_embed=1&ad_host_tier=13120&rvs=view_count%3D1130379%26author%3DTimothyDeLaGhetto2%26length_seconds%3D103%26id%3D8vtyPI1IW08%26title%3DNicki%2BMinaj%2BWardrobe%2BMalfunction%2BOn%2BGood%2BMorning%2BAmerica%2521%2Cview_count%3D440767%26author%3DTimothyDeLaGhetto2%26length_seconds%3D387%26id%3DwaPVDRoF7qk%26title%3DDating%2BTips%253A%2BThe%2BFirst%2BDate-%2BGIRLS%252C%2BDON%2527T%2BWATCH%2521%2Cview_count%3D1003471%26author%3DTimothyDeLaGhetto2%26length_seconds%3D243%26id%3DeL4ZkKk41U4%26title%3DSelena%2Band%2BJustin%2BBroke%2BUp%253F%2521%2BYES%2521%2521%2521%2Cview_count%3D788671%26author%3DTimothyDeLaGhetto2%26length_seconds%3D173%26id%3DZjSopneFT1w%26title%3DNo%2BHomo%2Bis%2BGay%2Cview_count%3D84026%26author%3DTraPhikMusik%26length_seconds%3D200%26id%3DyDvzq1qcgCY%26title%3DCrushin-%2BMichelle%2BMartinez%2Bfeat.%2BTraphik%2Cview_count%3D3003%26author%3DKatrinaLynneNorman%26length_seconds%3D224%26id%3Dy5HjkslzBPI%26title%3DKatrina%2527s%2BCorner%2B%25233%2B%2528Q%2B%2526%2BA%2529%2Cview_count%3D659%26author%3DDanceWithUsTV%26length_seconds%3D127%26id%3Dp-zxFxHiamg%26title%3DChris%2BBrown%2Bft.%2BJustin%2BBieber%2B-%2BLadies%2BLove%2BMe%2B%2528DANCE%2529%2Cview_count%3D32110%26author%3DMM2786%26length_seconds%3D167%26id%3D02IMYFEhY5o%26title%3DBow%2BChicka%2BWow%2BWow%2Bby%2BMike%2BPosner%2BREMIX%252FCOVER%2B-%2BMichelle%2BMartinez%2BFREE%2BDOWNLOAD%2Cview_count%3D10991%26author%3DMM2786%26length_seconds%3D272%26id%3DBmFgf8UH9E0%26title%3DCrushin%2BMusic%2BVideo%2B-%2BMichelle%2BMartinez%2Bft.%2BTraphik&vq=auto&iv_enabled_features=TCS&ad3_module=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswfbin%2Fad3-vflUgNhz5.swf&gut_tag=%2F4061%2Fytpwatch%2Fmain_12045&ptchn=TimothyDeLaGhetto2&as_launched_in_country=1&length_seconds=272&feature=topvideos_entertainment&enablejsapi=1&plid=AASqkn3hipa2q84E&tmi=1&afv=True&ad_tag=http%3A%2F%2Fad-g.doubleclick.net%2Fpfadx%2Fcom.ytpwatch.entertainment%2Fmain_12045%3Bsz%3DWIDTHxHEIGHT%3Bmpvid%3DAASqkn3jdebiFvtN%3B%21c%3D12045%3Bytps%3Ddefault%3Bklg%3Den%3Bkvid%3Dry_C69Pdc38%3Bkpu%3DTimothyDeLaGhetto2%3Bkr%3DF%3Bkt%3DK%3Bko%3Dp%3Bkbz%3D1%3Bkpid%3D12045%3Bkga%3D-1%3Bytvt%3Dw%3Bafct%3Dsite_content%3Bkgg%3D-1%3Bkcr%3Dus%3Bu%3Dry_C69Pdc38%7C12045%3Bafv%3D1%3Bkhd%3D1%3Bdc_dedup%3D1%3Bshortform%3D1%3B&ad_video_pub_id=ca-pub-6219811747049371&ad_slots=0&watermark=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswf%2Flogo-vfl_bP6ud.swf%2Chttp%3A%2F%2Fs.ytimg.com%2Fyt%2Fswf%2Fhdlogo-vfloR6wva.swf&oid=6iPyFcBDxPU&ad_channel_code_overlay=invideo_overlay_480x70_cat24%2Cafv_overlay%2Cafv_overlay_us_1%2Cafv_user_timothydelaghetto2%2Cytps_default%2Cytel_detailpage%2Cyt_mpvid_AASqkn3jdebiFvtN%2Cyt_cid_12045&pyv_in_related_cafe_experiment_id=&video_id=ry_C69Pdc38&dclk=True&sk=zL0zeV1YSbz_sRi_rcoPhEaNIaWG9Q_fC" I want to be able to pull all of the URLs out of that. Is there something with PHP that can help me traverse through the different variables that are set? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/244844-flashvars-library/#findComment-1257890 Share on other sites More sharing options...
Adam Posted August 16, 2011 Share Posted August 16, 2011 You could select the text within the parameter value (i.e. flashvars="<here>"), run it through html_entity_decode, and then use parse_str to return an array containing the values. Quote Link to comment https://forums.phpfreaks.com/topic/244844-flashvars-library/#findComment-1258241 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.