What’s the best way to get content from an external website via php?
Using php how do I go to webpage (ex: http://store.domain.com/1/) and scan the HTML coding for data that is found in between (which is the letter C and E). what php method do I use?
<span id="ctl00_ContentPlaceHolder1_phstats1_pname">C</span>
<span id="ctl00_ContentPlaceHolder1_phstats2_pname">E</span>
then save “C” (the found string) to $pname
$_session['pname1'] = $pname1;
$_session['pname2'] = $pname2;
The most efficient method is:
Then all yours values will be in the $list array, the count of which is $on.
You could also do it in one line with one of the preg functions, but I like the old-school method, it’s a nanosecond faster.