0

I am trying to get a value in a script tag with PHP from a page I need to get the value of page_id with in this script tag how can I do that ?

<script type="text/javascript">
    $(document).ready(function() {   Analytics.logAndSendEventToGA(["wap:album_detail:::view","utm_content","wap:album_detail:::view","utm_page","album_detail","utm_button","","page_id","20316543"]);
});
</script>
  • You can't do with php. PHP is server side code, js is client side code. You need to get the code with js and using some tecnology (like ajax) to send the code to server. – Giacomo M May 24 '20 at 06:18
  • i am scraping the page with php and need to filter and get the value of the script tag – DrunkenMonkey May 24 '20 at 06:26
  • Please have a look at the duplicate and see if you can get further with your problem, then come back if you have a specific issue with the code. – Nigel Ren May 24 '20 at 06:44

0 Answers0