Code Quiz

cybrax

Community Advocate
Community Support
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.




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

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
All of them: X10 ToS says no content scraping
Code A: No problem with YouTube API although the URL may be malformed
Code B: No idea
Code C: Probably against Google's ToS
 

cybrax

Community Advocate
Community Support
Messages
764
Reaction score
27
Points
0
All of them: X10 ToS says no content scraping

Hmmm, but surely.. any web site that provides an API feature is granting permission to query and extract information from them. Whilst this may fall under the broad description of 'scraping' it's certainly not theft of content.
 
Top