Date | November 2019 | Marks available | 5 | Reference code | 19N.2.SL.TZ0.7 |
Level | SL | Paper | 2 | Time zone | no time zone |
Command term | Evaluate | Question number | 7 | Adapted from | N/A |
Question
OrderYourFoods is an online company that allows customers to order food and get it delivered to their location. It operates in a number of cities in India.
On the home page of the company’s website www.orderyourfoods.com, the customer has to enter the city name and the address the food needs to be delivered to. Based on this information, the website displays a list of restaurants.
The website has a pop-up advert that encourages customers to subscribe for discount offers, see Figure 3.
Figure 3: An example of a pop-up advert
The following code is executed when the customer clicks on the subscribe button.
<? php
$to = 'info@orderyourfoods.com';
$from = '$_POST['email']';
$headers = "From: " . $from . "\r\n";
$subject = "New subscription at OrderYourFoods";
$body = "New user subscription: " . $_POST['email'];
if( filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) )
{
if (mail($to, $subject, $body, $headers, "-f " . $from))
{
echo 'Your e-mail (' . $_POST['email'] . ') has been added to our
mailing list!';
}
else
{
echo 'There was a problem with your e-mail (' . $_POST['email'] . ')';
}
}
?>
The website uses the following method to communicate with the potential customers, see Figure 4.
Figure 4: Banner for OrderYourFoods.com
OrderYourFoods currently displays an email address and a phone number to show customers how they can be contacted.
State the protocol used in the company’s website.
Explain the importance of protocols on the World Wide Web.
State the type of scripting used in the php code.
State one inbuilt function along with parameters used in the php code.
Describe the processing that occurs when the subscribe button is clicked.
Identify one additional method of online interaction that can be incorporated in this website.
OrderYourFoods is concerned that it never appears close to the top of the list of search results when the term “food delivery” is typed into a search engine.
OrderYourFoods has decided to use black hat search engine optimization techniques to be more visible in search engines.
Evaluate this decision.
Markscheme
Award [1 max].
Hypertext transfer protocol secure/https;
Do not accept http.
Award [4 max].
To allow successful communication to take place;
Ensure data integrity such as error checking;
Regulate flow control such as prevent a fast sender from overwhelming a slow receiver;
Managing deadlock when two processes are each waiting for the other to complete before proceeding;
Manage congestion;
Manage error correction such as enabling reliable delivery of digital data over unreliable communication channels;
Manage packet switching;
Manage security / encryption / authentication ……;
Award [1 max].
Server-side scripting;
Award [1 max].
filter_var($_POST['email'], FILTER_VALIDATE_EMAIL);
mail($to, $subject, $body, $headers, "-f " . $from);
Award [3 max].
The script reads the email id;
Checks if the email address entered is valid/executes the filter( ) function;
If correct, then the mail( ) function of PHP adds the email address and displays that your email address has been added to our mailing list;
Else, the error message will be displayed;
There is no error message if the email address is invalid.
OR
- The script gets an e-mail address via POST
- It checks whether it is valid via a filter function; if not, it does nothing
- If it is valid, it checks with the mail function, and displays either a success or an error message
Award [1 max].
Social Networking/Facebook/Social Media/Twitter;
Forums;
Online chat;
Award [5 max].
Advantages [2 max]
The use of black hat SEO techniques may increase the visibility of the OrderYourFoods website;
Which will bring a short term gain;
Disadvantages [2 max]
Black hat techniques are unethical;
Use of these techniques may lead to blacklisting;
Evaluative comment [1 max]
OrderYourFoods may decide that the need to increase their visibility, and increase their sales potential, so this may be a pragmatic (if unethical) compromise;
OrderYourFoods may decide that the potential long term risks that may arise from the use of an unethical technique may not be a risk that is worth taking may affect the company’s reputation;
Examiners report
Not all candidates registered the fact that this site would need to be secure and therefore would use the HTTPS protocol.
As this was a 4-mark question a brief definition type response would be unlikely to score highly. Most commented on the fact that protocols are needed to ensure that communication takes place, but few were able to provide the specific detail that an "explain" question demands.
Schools need to be aware that the candidates are expected to be practiced in the use of web software such as php, JavaScript and CSS. Answers did not show a high level of understanding even though some gained marks through answering quite generally in part (b).
A specific web element was expected here — many answered with on-line chat.
Candidates were more comfortable with this topic and provided some good discussions identifying both the short-term gains and long-term consequences of black hat SEO.