Created
November 11, 2016 19:11
-
-
Save ifarbod/43c233d3b6d2f9d56309c5dd03ea53ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$doc = file_get_contents('http://opensource.spotify.com/cefbuilds/index.html'); | |
$pattern = '/href="cef_binary_[0-9].[0-9]+.[0-9]+.[a-zA-Z0-9]+_windows32_minimal.tar.bz2"/'; | |
$cefpath = 'http://opensource.spotify.com/cefbuilds/'; | |
preg_match($pattern, $doc, $matches); | |
$cefbuildnum = $matches[0]; | |
$cefbz = substr($cefbuildnum, 6, strlen($cefbuildnum) - 7); | |
$finalPath = $cefpath . $cefbz; | |
header('Location: ' . $finalPath); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment