オンライン時刻表 (学校用) から配列にレッスンを取得する必要があります。したがって、データをデータベースに挿入できます。オンライン時刻表 (url: roosters-hd.stenden.com ) は次のようになります。
左側には時刻が表示され、上部には学校の曜日 (月、火、日、木、金) が表示されます。非常に基本的です。
各レッスンには、取得する必要がある 6 つの値が含まれています。
それに加えて、[startDate] と [endDate] も取得する必要があります。時間は、レッスンセルがどの行にあるか、およびその行スパンに基づいています。日付は、開始日 (上に印刷) に列番号を追加することで計算できます。したがって、最終的に配列は次のようになります。
[0] => Array
(
[0] => Array
(
[Name] => Financiering
[Type] => WC
[Code] => DECBE3
[Classroom] => E2.053 - leslokaal
[Teacher] => Verboeket, Erik (E)
[Class] => BE1F, BE1B, BE1A
[StartDate] => 04/06/2013 08:30:00
[EndDate] => 04/06/2013 10:00:00
)
etc.
私のデータ取得の経験が不足しているため、非常に非効率的で柔軟性のないソリューションになってしまいます。XMLパーサーを使用する必要がありますか?それとも正規表現?この問題に取り組む方法についてのアイデアはありますか?