simple-html-dom

PHP Simple HTML DOM Outputting Blank Page

£可爱£侵袭症+ 提交于 2019-12-11 09:19:00
问题 So, I am attempting to output the playtimes of a person playing L4D2 (game ID 550) and while this script used to work, it now only outputs a blank page using this "PHP Simple HTML DOM" I had backed up here http://rghost.net/45405596. If I download and try to use the newest simple dom from their website instead of showing nothing it shows Call to undefined function file_get_dom() on line 9" Here is the code I am running <?php ini_set('memory_limit', '-1'); include('simple_html_dom.php');

Simple HTML DOM Parser. Remove first row in table and then remove second column of each

不问归期 提交于 2019-12-11 06:56:33
问题 I am trying to parse an HTML string which is a table. I managed to remove the first row of the table. How can I then remove the second column in the table? I remove the first row like this: $preparsed = "<div style='border:1px #CCCCCC dotted; padding:5px'><div style=''> <div id='divPrint'> <table cellpadding='5' cellspacing='0' width='886'> <tr bgcolor='#666666' class='normal' style='color:#FFFFFF; font-weight:bold;'> <td width='100px' style='font-size:11px;'><b>Type</b></td> <td width='110px

Get text outside of elements

前提是你 提交于 2019-12-11 06:46:25
问题 I am using Simple html dom to scrape a website. The problem I have run into is that there is text positioned outside of any specific element. The only element it seems to be inside is <div id="content"> . <div id="content"> <div class="image-wrap"></div> <div class="gallery-container"></div> <h3 class="name">Here is the Heading</h3> All the text I want is located here !!! <p> </p> <div class="snapshot"></div> </div> I guess the webmaster has messed up and the text should actually be inside

Can't Scrape Price in HTML_dom and curl

▼魔方 西西 提交于 2019-12-11 04:49:46
问题 Hey guys i got this weird problem i am trying to scrape product price from Aliexpress using _SIMPLE_HTML_DOM and it is not working because the source code can be find Inspect element but i can't find the source in when i go into CTRL+U For Example Now This is the source code when i press ctrl + u This is the Code i am using to scrape $curl->get('https://www.aliexpress.com/item/32844492002.html'); $response = $curl->getRawResponse(); $html4 = new simple_html_dom(); $html4->load($response);

PHP- HTML parsing :: How can be taken charset value of webpage with simple html dom parser?

和自甴很熟 提交于 2019-12-11 04:00:58
问题 PHP:: How can be taken charset value of webpage with simple html dom parser (utf-8, windows-255, etc..)? remark: its have to be done with html dom parser http://simplehtmldom.sourceforge.net Example1 webpage charset input: <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> result:utf-8 Example2 webpage charset input: <meta content="text/html; charset=windows-255" http-equiv="Content-Type"> result:windows-255 Edit: I try this (but its not works): $html = file_get_html('http:/

Looping through a table with Simple HTML DOM

随声附和 提交于 2019-12-11 03:55:41
问题 I'm using Simple HTML DOM to extract data from a HTML document, and I have a couple of issues that I need some help with. On the line that begins with if ($td->find('a')) I want to extract the href and the content of the anchor node separately, and place them in separate variables. The code however doesn't work (see output from echoes in the code below). What is the best way to do this? Note that my purpose is to create a XML document out of the information later on, so I need the information

Simple DOM file_get_html returns nothing

人走茶凉 提交于 2019-12-11 02:33:45
问题 I'm trying to scrape data from some websites. For several sites it all seems to go fine, but for one website it doesn't seem to be able to get any HTML. This is my code: <?php include_once('simple_html_dom.php'); $html = file_get_html('https://www.magiccardmarket.eu/?mainPage=showSearchResult&searchFor=' . $_POST['data']); echo $html; ?> I'm using ajax to fetch the data. When I log the returned value in my js it's completely empty. Could it be due to the fact that this website is running on

PHP Simple HTML DOM Parser : Select two classes

萝らか妹 提交于 2019-12-11 02:19:58
问题 My problem is very simple . Let's say I have multiple 'a' : <td class="autoindex_td"> <a class="autoindex_a snap_shots" href="http://example.com.html"> <img height="16" width="16" src="http://exmple.com/download/index_icons/winxp/sound.png" alt="[mp3]"></img> <strong> 05 - example.mp3 </strong> </a> </td> I just want to find 'strong' which has two classes . Here what I tried : foreach ($html->find('a[class=autoindex_a , class=snap_shots]') as $link) { if(isset($link)){ foreach($link->find(

Filtering Date In PHP DOM

余生长醉 提交于 2019-12-10 22:12:28
问题 I wanna replace all date with a space from the fetched content using SIMPLE HTML PHP DOM PARSER (simplehtmldom.sourceforge.net). Here is the code: include("simple_html_php_dom.php"); $html = file_get_html("http://freebacklinks.prijm.com"); //example.com $result = "$html"; $result = preg_replace("/([1-9]|[0-2][0-9]|3[0-1]) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [0-9]{4}/", " ", $result); $result = preg_replace("/(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ([1-9]|[0-2][0-9]|3[0

PHP Simple HTML DOM Parser Dies

穿精又带淫゛_ 提交于 2019-12-10 17:56:12
问题 I am screen scraping page with a bunch of subpages using Simple HTML DOM Parser. For some reason it parses the first 40 subpages just fine but when it comes to number 41 it dies with no error. I have made this test page and tried to log everything I do in my script aswell as some of the venets in the Simple HTML DOM Parser but I haven't been able to find the error. Does anyone have an idea why it does when parsing URL number 41? Or does anyone know of some cases Simple HTML DOM Parser will