Created
April 17, 2018 09:00
-
-
Save EhabElzeny/b13808a6aca9c76b53edfedb7b32805c to your computer and use it in GitHub Desktop.
dom_scraper
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 | |
$pageURL = "http://www.google.com"; // تقدر تستخدم اى موقع لجلب البيانات منه | |
require("simple_html_dom.php"); // | |
foreach($html->find('a[class=xyz]') as $element){ // a[class=xyz] قم بتغيير التاج ،بالاضافه الى اسم الكلس على حسب نوع الموقع | |
echo $element->href . '<br>'; // عرض نتائج العمليه | |
} //$element كائن يحتوي على جميع سمات جميع العناصر المطابقة وفقًا لمنتقيك ، وفعل ما تريده به. | |
// simple_html_dom.php: يجب تحميل الملف المساعد قبل الاجراء السابق حتى تقوم باستدعائه عن العمليه | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment