Is it possible to scrape content or data from dynamic web page? If it is possible please attach PHP code. Thanks in Advance.
Asked
Active
Viewed 83 times
-3
-
2Have you tried anything yet? Please add here. – PHPExpert Feb 18 '16 at 06:03
-
try to do your homework yourself . – Drudge Rajen Feb 18 '16 at 06:04
-
you want to show the php code on browser ? – Hujjat Nazari Feb 18 '16 at 06:13
-
Thank you guys, But I have done it... – Pugazh Azhagu Thirumalai Feb 27 '16 at 09:06
1 Answers
-1
<?php
$html = file_get_contents("http://yellowpages.sulekha.com/chennai/lakshmi-air-system-virugambakkam-chennai_contact-address");
preg_match_all( '/ (.*?)</p>/s', $html, $posts, PREG_SET_ORDER // formats data into an array of posts ); print_r($posts[0][1]); echo "
" . count($posts) . " posts found
";-
You should add your code in question. Also, using Ctrl+K to wrap your PHP code. – Tuan Ha Feb 27 '16 at 09:29