Created
October 31, 2014 03:10
-
-
Save calibr/ee5031e9a7863725a52d to your computer and use it in GitHub Desktop.
parse playstore app image
This file contains hidden or 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 | |
| function grab($url) { | |
| $page = file_get_contents($url); | |
| if(preg_match('@<div class="cover-container">(.+?)</div>@', $page, $m)) { | |
| if(preg_match('@src\s*=\s*"(.+?)"@', $m[1], $m)) { | |
| return $m[1]; | |
| } | |
| } | |
| return null; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment