I have a PHP script that creates a calendar and highlights the current day and everything. I want to open a website and read a table like the one below, and getting the “info” for a “date” and put it on my calendar.
<table>
<tr>
<th>Date</th>
<th>Info</th>
</tr>
<tr>
<td>2/20/2013</td>
<td>Meeting</td>
</tr>
<tr>
<td>2/24/2013</td>
<td>Another meeting</td>
</tr>
</table>
With this code:
$url = $pageurl;
$content = file_get_contents($url);
$needle = $month . '/' . $list_day . '/' . $year;
if (strpos($content, $needle)) {
$calendar .= '<p>STUFF</p><p>MORE STUFF</p>';
}
I have been somwhat successful, I can now output “STUFF” and “MORE STUFF” onto a day that appears on the calendar. But now I want to post exactly what that stuff is for that day. How can I do this? Any help would be appreciated.
I answered a similar question here. You can copy the
getCellValue()function from there, and use it like:This should print the corresponding “Info” value for the requested date (“Meeting”)