javascript - How to get content from external page where itemprop equals...? -


i content app page on google play website. right content included in .content class. numbers of installs. div looks this:

<div class="content" itemprop="numdownloads">  </div> 

anybody knows how itemprop="numdownloads" .content class?

this code right now:

blade.php

<?php echo file_get_contents($_get['url']); ?> 

script

<script>   $(function(){     var contenturi= 'https://play.google.com/store/apps/someapp .content';     $('#response').load('grab.php?url='+ contenturi);   }); </script> 

you can use regular expression in php or in javascript also. i've implemented php version, pattern easy implement in javascript:

$sitecontent = ''     . '<div class="content" itemprop="7">  </div>'     . '<div class="content" itemprop="5768">  </div>'     . '<div class="content" itemprop="69">  </div>';  $matches =array(); preg_match_all('/itemprop\s*=\s*[\'"]([^\'"]+)[\'"]/im', $sitecontent, $matches); var_dump($matches[1]); 

the output is:

array   0 => string '7' (length=1)   1 => string '5768' (length=4)   2 => string '69' (length=2) 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -