Category : parsing

I am having trouble fixing the following error in my WordPress theme’s file. Parse error: syntax error, unexpected ‘?’ in C:inetpubwwwrootwp-contentpluginsstoni-coreincludestheme-helpertheme-helper.php on line 23 The site has two staging(DEV/UAT) sites and a live(PROD) site, and the UAT and PROD sites share the exact same files as the DEV, yet the DEV is spitting out the ..

Read more

I have this code which extract youtube URL : $yt = get_from_path($dom, ‘//*[contains(@href,"youtube.")]/@href’); $data["youtube"] = sizeof($yt) > 0 ? $yt[0] -> value : ""; and I want to apply this function I found here to that 2 lines of code above to get only the youtube ID, not the whole URL preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v/)[^&n]+(?=?)|(?<=v=)[^&n]+|(?<=youtu.be/)[^&n]+#", $link, $matches); Thanks ..

Read more

I just want to get the value of the span that’s my code: <?php include(‘simple_html_dom.php’); $html = file_get_html(‘https://ru.investing.com/commodities/gold’); echo $html->find("span[class=arial_26 inlineblock pid-8830-last]",0)->plaintext; ?> That’s my error: Fatal error: Uncaught Error: Call to a member function find() on bool in /home/f0514538/domains/f0514538.xsph.ru/public_html/test/crypto/tovar/gold.php:6 Stack trace: #0 {main} thrown in /home/f0514458/domains/f0514458.xsph.ru/public_html/test/crypto/tovar/gold.php on line 6 Sourc..

Read more

I have an .ini file and .php file. in the php file i write this line: $ini = parse_ini_file(__DIR__.’/../config/app.ini’, true); // let’s we call it.. parse line. the ini file locks like this: [PHP] [global-data] host = ‘localhost’ [local-data] host-path = ‘/Web/Treaning/all/Cut%20Cat%20Shortener’ [log] main-log-file = ‘log/mainLog.log’ db-logf = ‘log/sql.log’ db-log-con = ‘log/mysqlConnection.log’+ [databases] db-lang = ..

Read more

I cant able to parse a file .. And this is my input: 155.123.11.1 – – [24/May/2021:10:07:36 +0530] "POST/c1111//xxx/1/reaction/something][HTTP/1.1" 2008975 "-" "rock" i need to parse the above input access log files thanks in advance.. Sourc..

Read more

i want to have an array parsed from 3rd party site… given a site: (example:) https://videa.hu/player?f=8.1780672.2241728.0 if i type videaPlayerController.contentConroller.context.xmlValues.video_sources into console i get the sources, that’s what i need… The response comes from VideaPlayerClasses.min.js but as the name implies it’s a minified js file… and i completly lost in the code trying to find ..

Read more