Using php coding, I'm attempting to make a script which will grab content from another URL and give each word/number a php variable. I'm unsure whether this is possible, hence the reason why I've come onto stackoverflow and hoping for assistance from other members.
This is what I've currently got:
<?php
$searchdata = file_get_contents('http://www.example.com/dynamic.html');
echo $searchdata;
?>
The code grabs the data from the page titled "dynamic.html" and displays it. The content within dynamic.html is simply a line of text, each word is separated by a single space. The contents within the page looks something similar to:
92 AULLAH1 325 6523 37 1 12 5 #endofscript
I've said it looks similar to, as this is a dynamic page and varies all the time. The thing I'd like to do is give each number/word a php variable. E.G. 92, AULLAH1, 325, 6523, 37, 1, 12, 5 each should have a separate variable ($number, $text etc...). Notice I don't require a variable for #endofscript.
How would I go about doing this? The document is a dynamic page, so the numbers may be different as well as "AULLAH1".
Kind regards, and I appreciate every single response. :)