PHP Development

back to main page back to last page

There are 4 PHP files that drive the backbone of the 3 Gadgets

  1. getPage.php
  2. makeBuble.php
  3. getCourseData.php
  4. phpFunctions.php

The later file holds all the functions required by the first 3 files.

The getPage.php file is called once a user issues a course search inside the Yedion gadget
the maxeBuble.php is called from the hourTable gadget during its loading in order to get the information shown on the hover bubles, it also brings the date of the first test of a course.
the getCourseData.php file, is used is called from the Yedion gadget, during its loading in order to get course data, such as the course name, course web site and course test date.

they all use functions located in the phpFunctions.php file, the list of functions and their description is given below

Functions Description:


This very important function calls the university yedion page, with the course num and semester
then it filters all the garbage information, and returns an html code with the specific course data
in a way that each group is seperated from the rest by a <br> tag, and the information inside is seperated by spaces.
this data will be processed later on by the changeRowToArray function.


params: htmlData, recitationArray, lectureArray, semesterFilter, recitation(boolean flag)

This function parses a single row of data from the parseHtml function, it formats the data according to our agreed upon communication
protocol, and pushes the data to the lecture or recitation array according to the semesterFilter and recitation flag


params: english

This function returns the hebrew letter of the semester according to a given english letter


params: day

In order to save storage space, this function changes the hebrew letters to english letters, passing a hebrew letter in get format uses up 7 characters, changing it to a single english letter saves alot of room


params: htmlText

This function takes a string and encodes it to UTF-8 format, we use this because the university works with ISO and google works with UTF8


params: htmlText

This function takes an HTML text and gets all the site links (<a> tags) from that text, we use this because the university stores the course site
and the course test dates inside those tags


params :siteLinksOutput

This function gets the output of the previous function and parses it to get the date of the test


params: siteLinksOutput

This function gets the output from getSiteLinks and returns the course site (if exists) from it


params: recitationArray, lecturesArray

This function is used in the getBuble.php page to create a JSON object for the hourTable gadget in order for the later to create the cool bubles of the course information


params: htmlText, tagsList, tagsData(boolean flag)

this function parses an htmlText and strips from it a list of given tags, the tags data boolean states if to keep or not the data within the tags, this function is used in the parseHtml function to remove excess data

if this is not enough feal free to look at the source Code:

phpFunctions code
getPage code
makeBuble code
getCourseData code

back to main page back to last page

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License