Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
53 views

I was parsing a Steam profile using phpQuery and encountered a problem. To display the background gradient, I need to take the class from the body element, but when echo($pq) the body element does not ...
fuzer322's user avatar
0 votes
2 answers
69 views

I am using gravitypdf/querypath (from composer) I am trying to achieve this function from jQuery/JS in PHP QueryPath: jQuery("html")[0].outerHTML; I have tried the following: echo (string) ...
Luc Laverdure's user avatar
0 votes
1 answer
39 views

function getPrice() { return $('.product__element').contents().eq(0).text(); } console.log(getPrice()); //returns **A**. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery....
user2285323's user avatar
-4 votes
1 answer
132 views

Code is supose to show every query from array. It works corectlly in means that is executing and showing every query in new div with all info that query return, but after that rest of the code is not ...
Kacper Zyberski's user avatar
0 votes
1 answer
300 views

First submission field (acf field) of the current post is empty . So, the query should show 0, but it shows 1. I tried following codes, and all of them show 1. Would you please let me know how to get ...
isbe's user avatar
  • 253
0 votes
2 answers
970 views

this is my post loop that i am using <?php $sticky = get_option( 'sticky_posts' ); rsort( $sticky ); ...
Abdullah Khalid's user avatar
1 vote
1 answer
439 views

I'm trying to get value, text and hyperlinks using PHPQuery from a large file and convert it to Array. I have tried some of the code but confusion in foreach loop to get data from all class="hl&...
Sabir Shah's user avatar
1 vote
1 answer
56 views

I am making parser of articles and I need to put all parsed data in josn. I tried to put them to array and then transform it in JSON, but I have some troubles. I get JSON like this: [{"title&...
Denis L's user avatar
  • 121
1 vote
1 answer
41 views

Hello i work on one project using JS, PHP & Mysql. I have 2 tables which are : invoice (inv_id,date,total,paid,due) invoice_infos (id, product_name,product_price,inv_id) invoice_infos contains ...
Darel Aurel's user avatar
1 vote
0 answers
144 views

I scrape the google ranks with this script: <?php include("phpQuery-onefile.php"); $url = "https://www.google.com/search?hl=en&output=search&start=1&q=shoes"; $ch = ...
inercia inercianet's user avatar
3 votes
2 answers
2k views

Hello everybody i have two tables which are this structure invoice table : invoice_id customer_name order_date invoice_infos : id invoice_id production_name product_prix qtt Now I wanna make a ...
Darel Aurel's user avatar
0 votes
3 answers
2k views

I am trying to query an XML file using XPath. But as return I get nothing. I think I formatted the query false. XML <subject id="Tom"> <relation unit="ITSupport" role="ITSupporter" />...
Nedi-san's user avatar
  • 357
1 vote
1 answer
278 views

I have custom HTML pagination template: <ul class="number-list"> <li><a href="/article/" class="page-number js-page-filter " data-page="1">1</a></li> // ...
Andreas Hunter's user avatar
0 votes
0 answers
30 views

I do not understand why it does not work. script does not parse the link from the scr="" <html> <head> <title>test</title> </head> <body> <?php header('Content-...
dJoni .D's user avatar
-1 votes
1 answer
389 views

I have a task. The table on this page contains links. In every link, for exampple first, exist one field with email. I must coppy all these emails. I writing a script using phpQuery. <?php ...
engins's user avatar
  • 17
-1 votes
1 answer
291 views

I can not understand how to search for information in div style. Example: <div style='font-size:19px;line-height:22px;color:#000;font-weight:bold;'><h1 title='lamborghini aventador 640' ...
Марат Гатауллин's user avatar
0 votes
1 answer
554 views

I have decimal column in db and trying to remove trailing zeros only from int numbers (100, 200, 300) with query in php. I tried with trim/cast functions but 10.50 turned 10.5. SELECT TRIM(TRAILING '...
whiskey_'s user avatar
0 votes
0 answers
108 views

I got a little problem here. I'm parsing JSON data from Reddit (eg. https://www.reddit.com/r/Chilledout.json); and I need to setup a function that would filter the data to remove every post that does ...
gordie's user avatar
  • 2,025
0 votes
1 answer
877 views

How can I get element by order from the end? For example, I need to get second item from the end. <?php $html = <<<EOD <div style="text-align: center;" class="navigation"> ...
Artem's user avatar
  • 589
-1 votes
2 answers
82 views

Hi I have a value in variable i want to add this value first time when loop start not always. for example <?php $balance = 100; while($row = mysql_fetch_array($query) { echo $row['...
Hani Mehdi's user avatar
0 votes
1 answer
368 views

I'm a big fan of the PHP library phpQuery content parser (because its quite like jQuery, while using the PHP DOMDocument to extract Markup) but I've noticed a bug with specific elements with the quick ...
classicjonesynz's user avatar
0 votes
1 answer
66 views

I am doing some work with the amazon api(s) and have run into an issue while creating new documents in PHP query. I am using version 0.9.5 var_dump($innerHTML); $php_query=\phpQuery::newDocument("&...
ryanolee's user avatar
0 votes
2 answers
154 views

I'm using Zend Framework2 and trying to filter content of <form> tag from whole HTML. I'm scrapping the page from different site and the page loads after some time and huge full page loader is ...
Keyur's user avatar
  • 1,121
0 votes
1 answer
485 views

I have html page what im trying to read(used htmlsql.class.php, but as its too old and outdated, then i have to use phpQuery). The html markup is: <ul class="small-block-grid-1 medium-block-grid-...
Gun arves's user avatar
0 votes
3 answers
2k views

I'm using this plugin, https://github.com/punkave/phpQuery for editing the HTML content. This is my code, //$formdata contains plain HTML $doc = phpQuery::newDocument($formData); //Some Editing $...
Keyur's user avatar
  • 1,121
1 vote
2 answers
2k views

I'm using phpQuery to parse a site: HTML example: <div class="post" id="1232323"> <div class="title">Example</div> <div class="text">texttexttext</div> </div&...
dayMe's user avatar
  • 21
0 votes
2 answers
693 views

hello there I have PHP query that Fetch Records from a database with where condition I have four pages in WebSite I want to Fetch data from DataBase with where Condition Ever pages Fetch own Content ...
Uzair's user avatar
  • 21
1 vote
3 answers
229 views

There is HTML like <h3>Specifications</h3> <div class="row"> some text </div> <div class="row"> some text 2 </div> <div class="row"> some text 3 </div> ...
Umair Ayub's user avatar
  • 21.7k
0 votes
1 answer
182 views

I have a script parsing a html page. One section parses the various tr elements. Suppose we have a tr structure like this: <tr class="a test" style="display: none;"> <td class="numeric"&...
macmiller's user avatar
  • 324
0 votes
1 answer
739 views

Why would un-commenting the last line in this code cause a fatal error $html = phpQuery::newDocumentHTML($social_icons_block); $html->find('.managed-form')->remove(); $html->find('.drag-...
orbitory's user avatar
  • 1,120
3 votes
0 answers
374 views

I am scraping a Magento website. I need to get quantity of product as well. Here is website www.nyxsleek.com I am scraping quantity by inputting quantity one by one until it gives error in cart. I ...
Waqar ahmad's user avatar
0 votes
0 answers
48 views

Hi I'm trying to do filter through the form with which it is set by the user criterion to return the items, which include those criteria. Code: $filter = " SELECT * FROM images WHERE (id = '$_GET[...
Paspartu's user avatar
  • 107
0 votes
2 answers
2k views

I am trying to get all links of contains specific url page on a given page using PHPQuery. I am using the PHP support syntax of PHPQuery. include_once 'phpQuery.php'; $url = 'http://www.phonearena....
Tarik Curto's user avatar
1 vote
1 answer
551 views

I'm trying to get the price for the following product http://www.newegg.com/Product/Product.aspx?Item=N82E16822236715. Using just jQuery, the following code is working and gives me the value before ...
shaswa's user avatar
  • 345
1 vote
2 answers
52 views

I developed a small script to update some fields in two tables. The query run with no error, but for any reason nothing happen on these fields. I'm sure that something are omittedd by me, but I don't ...
user avatar
0 votes
1 answer
87 views

I want to scrape this URL. I am using phpQuery library for this purpose. I want to scrape #weedmenuPane from that link which contains some items and its prices. Problem is, when I get scraped HTML, ...
Arslan Akbar's user avatar
1 vote
0 answers
117 views

I'm creating a simple templating system. I know PHP is a great template-system but I don't want clients to add PHP and ruin things. So I'm using phpQuery to parse simple tags in the HTML. I can ...
nhiik's user avatar
  • 73
11 votes
4 answers
2k views

I am using phpquery to extract some data from a webpage. I need to identify the menu of the page. My implementation is to find each element that has sibilings > 0 and last-child is an "a". My code is: ...
Ahmad's user avatar
  • 464
12 votes
6 answers
2k views

I need to get all the values of a dropdown in an array based upon the id of the dropdown using PHPQuery. The following is the HTML: <select name="semester" id="semester" class="inputtxt" onChange=...
Shantanu Paul's user avatar
0 votes
1 answer
468 views

I have a HTML file like with a table like this: <tr valign="top" class="dselbkg" onMouseOver="this.className='selbkg'" onMouseOut="this.className='dselbkg'" > <td height="20" align="...
Shantanu Paul's user avatar
4 votes
2 answers
163 views

I am building an app that extracts data from a website and displays them in my app. I am using PHPQuery to extract data in my server-side code. However, one page contains an .asp form with two ...
Shantanu Paul's user avatar
0 votes
0 answers
88 views

I am trying to parse an HTML source to make some changes on it. Until now I was using Simple HTML Dom Parser but I am facing some memory leaking although using clear() function as in documentation. ...
n.h.'s user avatar
  • 189
0 votes
1 answer
318 views

I want to selecting an XML node based on whether it has a child with a URL attribute set to a certain value. I think this code shows phpQuery doesn't parse URL correctly... but I may have missed ...
pperrin's user avatar
  • 1,497
1 vote
0 answers
28 views

I'm trying to find custom html element with namespace but I could not get any success on it. I also checked other libraries like QueryPath, Ganon including phpQuery. Only PhpSimpleDom library can do ...
Saeed Afzal's user avatar
0 votes
1 answer
319 views

I am using PhpQuery to get all links with an specific class and after that I want to get the html source of each link to mess a little bit. But the first thing is that I am getting the links from a ...
Patrick Bard's user avatar
  • 1,824
0 votes
1 answer
493 views

I'm using phpQuery to fetch string from given url. as you can see in the image, there is a three space at the end of string appears like &nbsp; in chrome developer tools. i've used trim, ...
Sercan Kucukdemirci's user avatar
0 votes
1 answer
213 views

I am using phpQuery to simulate a browser request. Codes are simple as follow: require_once('phpQuery/phpQuery.php'); phpQuery::browserGet($url, 'success1'); function success1($browser) { print $...
Raptor's user avatar
  • 54.4k
0 votes
0 answers
721 views

I have just started using phpQuery, and the documentation isn't particularly good and not been able to find many examples on the web. I simply wanted to pass some html into phpQuery and match a ...
Dino's user avatar
  • 1,463
-1 votes
1 answer
376 views

I am just trying to get started with phpQuery DOM Parser but I don't understand how to load the current php file so that I can play with elements in this particular page. Say I have a php file about....
Raheel's user avatar
  • 9,064
1 vote
1 answer
550 views

I'm trying to get index of div which contains 'Shop Name' like: $doc = phpQuery::newDocument($shops_page); echo $shop_index = $doc->find(".shop_item:contains('Shop Name')")->index(); in JQuery $...
user2368299's user avatar