- Messages
- 764
- Reaction score
- 27
- Points
- 0
Code quiz
Which of these scripts is in violation of a TOS?
Bonus kudos if you explain whose TOS and why.
Which of these scripts is in violation of a TOS?
Bonus kudos if you explain whose TOS and why.
Code:
$search = "something" /// predefined or site visitor input from form field
////Code A
$url="http://gdata.youtube.com/feeds/api/videos?vq=$search=include&max-results=50";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$retrieved_data = curl_exec($ch);
curl_close($ch);
//// Code B
$url="http://search.bbc.co.uk/search?suggid=sp%3Apupa&go=toolbar&uri=%2F&q=$search";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$retrieved_data = curl_exec($ch);
curl_close($ch);
//// Code C
$url="http://www.google.co.uk/webhp?q=$search#sclient=psy&hl=en&site=webhp&source=hp&q=$search&btnG=Google+Search";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$retrieved_data = curl_exec($ch);
curl_close($ch);