Currently I am using this code.
$html = file_get_html($url);
$file = $html->find('audio');
$data['download'] = $file->attr['data-file'];
to try and gather the data from here.
<div class="actions clearfix">
<div class="player clearfix">
<div class="player-init preload" data-file="http://example.com/mp3embed-cegoq1gcnrj6.mp3"></div>
</div>
</div>
My code from above is not working, for some reason.
Please tried below code.
$url = 'https://somedomain.com/somesite/';
$content = file_get_contents($url);
$first_step = explode( '<div class="player-init preload" data-file="' , $content );
$data['download'] = explode('"></div>' , $first_step[1] );
echo $data['download'];
exit;
May be Something like this will work.
$DOM = new DOMDocument;
$DOM->loadHTML($html);
$xpath = new DOMXpath($DOM);
$items = $xpath->query("//div[contains(@class,'player-init')]");
$mydata = $items->documentElement->getAttribute('data-file');
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I am using mysql_real_escape_string on my code and the data on the form is:
I have been trying to create an update function for my database and have been stuck for days on this now so thought that I would ask for helpThe code seems to run without issues and no errors are being reported but it isn't being updated
I share encrypted data with an external providerThe provider gives me the algo where the input string needs to be padded with blanks into 16byte blocks, i
My problem is that an array of data is not inserted to the database only last data is insertedSo, how to insert whole data at a time after click save button? I am using Codeigniter framework