User interface language: English | Español

Date November 2019 Marks available 1 Reference code 19N.2.SL.TZ0.7
Level SL Paper 2 Time zone no time zone
Command term State 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.

[1]
a.i.

Explain the importance of protocols on the World Wide Web.

[4]
a.ii.

State the type of scripting used in the php code.

[1]
b.i.

State one inbuilt function along with parameters used in the php code.

[1]
b.ii.

Describe the processing that occurs when the subscribe button is clicked.

[3]
b.iii.

Identify one additional method of online interaction that can be incorporated in this website.

[1]
c.

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.

[5]
d.

Markscheme

Award [1 max].
Hypertext transfer protocol secure/https;
Do not accept http.

a.i.

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 ……;

a.ii.

Award [1 max].
Server-side scripting;

b.i.

Award [1 max].
filter_var($_POST['email'], FILTER_VALIDATE_EMAIL);
mail($to, $subject, $body, $headers, "-f " . $from);

b.ii.

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

b.iii.

Award [1 max].
Social Networking/Facebook/Social Media/Twitter;
Forums;
Online chat;

c.

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;

d.

Examiners report

Not all candidates registered the fact that this site would need to be secure and therefore would use the HTTPS protocol.

a.i.

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.

a.ii.

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).

b.i.
[N/A]
b.ii.
[N/A]
b.iii.

A specific web element was expected here — many answered with on-line chat.

c.

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.

d.

Syllabus sections

Option C: Web science » C.1 Creating the web
Show 51 related questions
Option C: Web science

View options