mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-30 09:48:55 +00:00
Reverted to old RottenTomato.php version.
This commit is contained in:
@@ -2,6 +2,6 @@
|
||||
//run this once per day
|
||||
require_once("config.php");
|
||||
|
||||
$m = new \Film(['Echo' => true]);
|
||||
$m = new Film(['Echo' => true]);
|
||||
$m->updateUpcoming();
|
||||
|
||||
|
||||
@@ -1360,23 +1360,23 @@ class Film
|
||||
|
||||
switch ($operation) {
|
||||
case 'boxoffice':
|
||||
$data = $rt->getMoviesBoxOffice();
|
||||
$data = $rt->getBoxOffice();
|
||||
$update = Film::SRC_BOXOFFICE;
|
||||
break;
|
||||
case 'theaters':
|
||||
$data = $rt->getMoviesInTheaters();
|
||||
$data = $rt->getInTheaters();
|
||||
$update = Film::SRC_INTHEATRE;
|
||||
break;
|
||||
case 'opening':
|
||||
$data = $rt->getOpeningMovies();
|
||||
$data = $rt->getOpening();
|
||||
$update = Film::SRC_OPENING;
|
||||
break;
|
||||
case 'upcoming':
|
||||
$data = $rt->getUpcomingMovies();
|
||||
$data = $rt->getUpcoming();
|
||||
$update = Film::SRC_UPCOMING;
|
||||
break;
|
||||
case 'dvd':
|
||||
$data = $rt->getNewDvdReleases();
|
||||
$data = $rt->getDVDReleases();
|
||||
$update = Film::SRC_DVD;
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1,328 +1,234 @@
|
||||
<?php
|
||||
|
||||
use newznab\utility\Utility;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2011 Richard Hoppes.
|
||||
* Fetches and returns JSON documents from the Rotten Tomato API using a supplied API key.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
* of the Software, and to permit persons to whom the Software is furnished to do
|
||||
* so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
* */
|
||||
/**
|
||||
* Rotten Tomatoes API
|
||||
* Class RottenTomato
|
||||
*/
|
||||
class RottenTomato
|
||||
{
|
||||
/**
|
||||
* API Urls
|
||||
* Main link for all the methods.
|
||||
*/
|
||||
const ROTTEN_TOMATOES_API_LISTS_DIRECTORY = 'http://api.rottentomatoes.com/api/public/v1.0/lists.json';
|
||||
const ROTTEN_TOMATOES_API_MOVIE_LISTS_DIRECTORY = 'http://api.rottentomatoes.com/api/public/v1.0/movies.json';
|
||||
const ROTTEN_TOMATOES_API_DVD_LISTS_DIRECTORY = 'http://api.rottentomatoes.com/api/public/v1.0/lists/dvds.json';
|
||||
const ROTTEN_TOMATOES_API_DVD_TOP_RENTALS = 'http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/top_rentals.json';
|
||||
const ROTTEN_TOMATOES_API_MOVIE_SEARCH = 'http://api.rottentomatoes.com/api/public/v1.0/movies.json';
|
||||
const ROTTEN_TOMATOES_API_OPENING_MOVIES = 'http://api.rottentomatoes.com/api/public/v1.0/lists/movies/opening.json';
|
||||
const ROTTEN_TOMATOES_API_UPCOMING_MOVIES = 'http://api.rottentomatoes.com/api/public/v1.0/lists/movies/upcoming.json';
|
||||
const ROTTEN_TOMATOES_API_NEW_RELEASE_DVDS = 'http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/new_releases.json';
|
||||
const ROTTEN_TOMATOES_API_IN_THEATERS = 'http://api.rottentomatoes.com/api/public/v1.0/lists/movies/in_theaters.json';
|
||||
const ROTTEN_TOMATOES_API_BOX_OFFICE = 'http://api.rottentomatoes.com/api/public/v1.0/lists/movies/box_office.json';
|
||||
const ROTTEN_TOMATOES_API_MOVIE_INFO = 'http://api.rottentomatoes.com/api/public/v1.0/movies/%s.json';
|
||||
const ROTTEN_TOMATOES_API_MOVIE_CAST = 'http://api.rottentomatoes.com/api/public/v1.0/movies/%s/cast.json';
|
||||
const ROTTEN_TOMATOES_API_MOVIE_REVIEWS = 'http://api.rottentomatoes.com/api/public/v1.0/movies/%s/reviews.json';
|
||||
const API_URL = 'http://api.rottentomatoes.com/api/public/v1.0/';
|
||||
|
||||
/**
|
||||
* Review types
|
||||
*/
|
||||
const REVIEW_TYPE_TOP_CRITIC = 'top_critic';
|
||||
const REVIEW_TYPE_ALL = 'all';
|
||||
const REVIEW_TYPE_DVD = 'dvd';
|
||||
/**
|
||||
* API key
|
||||
* RT Api key.
|
||||
* @var string
|
||||
*/
|
||||
protected $apiKey;
|
||||
private $_apikey;
|
||||
|
||||
/**
|
||||
* Timeout seconds
|
||||
* @var int
|
||||
* @param string $apiKey RT Api Key.
|
||||
*/
|
||||
protected $timeoutSeconds;
|
||||
/**
|
||||
* Country
|
||||
* @var string
|
||||
*/
|
||||
protected $country;
|
||||
/**
|
||||
* Initialize
|
||||
* @param string $apiKey
|
||||
* @param int $timeoutSeconds
|
||||
* @param string $country
|
||||
*/
|
||||
public function __construct($apiKey, $timeoutSeconds = 15, $country = 'us') {
|
||||
$this->apiKey = $apiKey;
|
||||
$this->timeoutSeconds = $timeoutSeconds;
|
||||
$this->country = $country;
|
||||
}
|
||||
/**
|
||||
* Movie search
|
||||
* @throws Exception
|
||||
* @param string $query search term
|
||||
* @param int $page current page
|
||||
* @return array results
|
||||
*/
|
||||
public function movieSearch($query, $page = 0) {
|
||||
$params = [];
|
||||
$params['q'] = $query;
|
||||
if ($page)
|
||||
$params['page'] = $page;
|
||||
$result = $this->getResource(self::ROTTEN_TOMATOES_API_MOVIE_SEARCH, $params);
|
||||
if(!isset($result['movies']) && !empty($result['movies']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get movie reviews
|
||||
* @throws Exception
|
||||
* @param int $id rotten tomatoes id
|
||||
* @param string $reviewType review type
|
||||
* @param int $page current page
|
||||
* @return array results
|
||||
*/
|
||||
public function getMovieReviews($id, $reviewType = self::REVIEW_TYPE_ALL, $page = 0) {
|
||||
$url = sprintf(self::ROTTEN_TOMATOES_API_MOVIE_REVIEWS, $id);
|
||||
$params = [];
|
||||
$params['review_type'] = $reviewType;
|
||||
if ($page)
|
||||
$params['page'] = $page;
|
||||
$result = $this->getResource($url, $params);
|
||||
if(!isset($result['reviews']) && !empty($result['reviews']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get movie cast
|
||||
* @throws Exception
|
||||
* @param int $id rotten tomatoes id
|
||||
* @return
|
||||
*/
|
||||
public function getMovieCast($id) {
|
||||
$url = sprintf(self::ROTTEN_TOMATOES_API_MOVIE_CAST, $id);
|
||||
$result = $this->getResource($url);
|
||||
if(!isset($result['cast']) || empty($result['cast']))
|
||||
throw new Exception("No results");
|
||||
return $result['cast'];
|
||||
}
|
||||
/**
|
||||
* Get movie info
|
||||
* @throws Exception
|
||||
* @param int $id rotten tomatoes id
|
||||
* @return array
|
||||
*/
|
||||
public function getMovieInfo($id) {
|
||||
$url = sprintf(self::ROTTEN_TOMATOES_API_MOVIE_INFO, $id);
|
||||
$result = $this->getResource($url);
|
||||
if(!isset($result['id']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get new DVD releases
|
||||
* @throws Exception
|
||||
* @param int $page current page
|
||||
* @return array results
|
||||
*/
|
||||
public function getNewDvdReleases($page = 0) {
|
||||
$params = [];
|
||||
if ($page)
|
||||
$params['page'] = $page;
|
||||
$result = $this->getResource(self::ROTTEN_TOMATOES_API_NEW_RELEASE_DVDS, $params);
|
||||
if(!isset($result['movies']) && !empty($result['movies']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get movies that are coming soon
|
||||
* @throws Exception
|
||||
* @param int $page current page
|
||||
* @return array results
|
||||
*/
|
||||
public function getUpcomingMovies($page = 0) {
|
||||
$params = [];
|
||||
if ($page)
|
||||
$params['page'] = $page;
|
||||
$result = $this->getResource(self::ROTTEN_TOMATOES_API_UPCOMING_MOVIES, $params);
|
||||
if(!isset($result['movies']) && !empty($result['movies']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get movies currently in theaters
|
||||
* @throws Exception
|
||||
* @param int $page current page
|
||||
* @return array results
|
||||
*/
|
||||
public function getMoviesInTheaters($page = 0) {
|
||||
$params = [];
|
||||
if ($page)
|
||||
$params['page'] = $page;
|
||||
$result = $this->getResource(self::ROTTEN_TOMATOES_API_IN_THEATERS, $params);
|
||||
if(!isset($result['movies']) && !empty($result['movies']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get movies opening
|
||||
* @throws Exception
|
||||
* @return array results
|
||||
*/
|
||||
public function getOpeningMovies() {
|
||||
$result = $this->getResource(self::ROTTEN_TOMATOES_API_OPENING_MOVIES);
|
||||
if(!isset($result['movies']) && !empty($result['movies']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get top box office results
|
||||
* @throws Exception
|
||||
* @return array results
|
||||
*/
|
||||
public function getMoviesBoxOffice() {
|
||||
$result = $this->getResource(self::ROTTEN_TOMATOES_API_BOX_OFFICE);
|
||||
if(!isset($result['movies']) && !empty($result['movies']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get top DVD rentals
|
||||
* @throws Exception
|
||||
* @return array results
|
||||
*/
|
||||
public function getDvdTopRentals() {
|
||||
$result = $this->getResource(self::ROTTEN_TOMATOES_API_DVD_TOP_RENTALS);
|
||||
if(!isset($result['movies']) && !empty($result['movies']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get Movie Urls
|
||||
* @throws Exception
|
||||
* @return array results
|
||||
*/
|
||||
public function getMovieListsDirectory() {
|
||||
$result = $this->getResource(self::ROTTEN_TOMATOES_API_DVD_LISTS_DIRECTORY);
|
||||
if(!isset($result['links']) && !empty($result['links']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get list Urls
|
||||
* @throws Exception
|
||||
* @return array results
|
||||
*/
|
||||
public function getListsDirectory() {
|
||||
$result = $this->getResource(self::ROTTEN_TOMATOES_API_LISTS_DIRECTORY);
|
||||
if(!isset($result['links']) && !empty($result['links']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get DVD API Urls
|
||||
* @throws Exception
|
||||
* @return array results
|
||||
*/
|
||||
public function getDvdListsDirectory() {
|
||||
$result = $this->getResource(self::ROTTEN_TOMATOES_API_DVD_LISTS_DIRECTORY);
|
||||
if(!isset($result['links']) && !empty($result['links']))
|
||||
throw new Exception("No results");
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* Get resource
|
||||
* @param string $url
|
||||
* @param array $params parameters (key/value pairs) for query string
|
||||
* @return array decoded json response
|
||||
*/
|
||||
protected function getResource($url, $params = []) {
|
||||
$params['apikey'] = $this->apiKey;
|
||||
$params['country'] = $this->country;
|
||||
$queryString = http_build_query($params);
|
||||
$rawResponse = trim($this->httpRequest("{$url}?{$queryString}"));
|
||||
if (!$rawResponse)
|
||||
throw new Exception("No response");
|
||||
$decodedResponse = json_decode($rawResponse, true);
|
||||
if (!$decodedResponse)
|
||||
throw new Exception('Error parsing JSON response');
|
||||
if (isset($decodedResponse['error']))
|
||||
throw new Exception('API Error: ' + $decodedResponse['error']);
|
||||
return $decodedResponse;
|
||||
}
|
||||
/**
|
||||
* Perform HTTP Request
|
||||
* @param string $url url for request
|
||||
* @return string|boolean result
|
||||
*/
|
||||
protected function httpRequest($url) {
|
||||
//Test for allow_url_fopen to be enabled.
|
||||
//Many hosts disable this for security
|
||||
if(function_exists('curl_init')){
|
||||
return $this->httpRequestCurl($url);
|
||||
}elseif(ini_get('allow_url_fopen')){
|
||||
return $this->httpRequestFopen($url);
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
public function __construct($apiKey)
|
||||
{
|
||||
$this->_apikey = $apiKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform HTTP Request with fopen
|
||||
* @param string $url url for request
|
||||
* @return string|boolean result
|
||||
* Displays Top Box Office Earning Movies, Sorted by Most Recent Weekend Gross Ticket Sales.
|
||||
*
|
||||
* @param int $limit Limits the number of box office movies returned.
|
||||
* @param string $country Provides localized data for the selected country (ISO 3166-1 alpha-2) if available.
|
||||
* Otherwise, returns US data.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function httpRequestFopen($url){
|
||||
$http = [];
|
||||
$http['method'] = 'GET';
|
||||
$http['timeout'] = $this->timeoutSeconds;
|
||||
$response = @fopen($url, 'r', false, stream_context_create(['http' => $http]));
|
||||
$result = false;
|
||||
if ($response)
|
||||
$result = $response;
|
||||
return $result;
|
||||
public function getBoxOffice($limit = 10, $country = 'us')
|
||||
{
|
||||
return $this->_makeCall(
|
||||
'lists/movies/box_office.json',
|
||||
[
|
||||
'limit' => $limit,
|
||||
'country' => $country
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform HTTP Request with curl
|
||||
* @param string $url url for request
|
||||
* @return string|boolean result
|
||||
* Retrieves movies currently in theaters.
|
||||
*
|
||||
* @param int $limit The amount of movies in theaters to show per page.
|
||||
* @param int $page The selected page of in theaters movies.
|
||||
* @param string $country Provides localized data for the selected country (ISO 3166-1 alpha-2) if available.
|
||||
* Otherwise, returns US data.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function httpRequestCurl($url){
|
||||
// create curl resource
|
||||
$ch = curl_init();
|
||||
|
||||
// set url
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
|
||||
//return the transfer as a string
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
//set timeout
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeoutSeconds);
|
||||
// $output contains the output string
|
||||
$response = curl_exec($ch);
|
||||
|
||||
// close curl resource to free up system resources
|
||||
curl_close($ch);
|
||||
$result = false;
|
||||
if ($response)
|
||||
$result = $response;
|
||||
return $result;
|
||||
public function getInTheaters($limit = 16, $page = 1, $country = 'us')
|
||||
{
|
||||
return $this->_makeCall(
|
||||
'lists/movies/in_theaters.json',
|
||||
[
|
||||
'page_limit' => $limit,
|
||||
'page' => $page,
|
||||
'country' => $country
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves current opening movies.
|
||||
*
|
||||
* @param int $limit Limits the number of opening movies returned.
|
||||
* @param string $country Provides localized data for the selected country (ISO 3166-1 alpha-2) if available.
|
||||
* Otherwise, returns US data.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOpening($limit = 16, $country = 'us')
|
||||
{
|
||||
return $this->_makeCall(
|
||||
'lists/movies/opening.json',
|
||||
[
|
||||
'limit' => $limit,
|
||||
'country' => $country
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves upcoming movies. Results are paginated if they go past the specified page limit.
|
||||
*
|
||||
* @param int $limit The amount of upcoming movies to show per page.
|
||||
* @param int $page The selected page of upcoming movies.
|
||||
* @param string $country Provides localized data for the selected country (ISO 3166-1 alpha-2) if available.
|
||||
* Otherwise, returns US data.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUpcoming($limit = 16, $page = 1, $country = 'us')
|
||||
{
|
||||
return $this->_makeCall(
|
||||
'lists/movies/upcoming.json',
|
||||
[
|
||||
'page_limit' => $limit,
|
||||
'page' => $page,
|
||||
'country' => $country
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the DVD lists RT has available.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDVDReleases()
|
||||
{
|
||||
return $this->_makeCall('lists/dvds/new_releases.json');
|
||||
}
|
||||
|
||||
/**
|
||||
* The movies search endpoint for plain text queries. Allows you to search for movies!
|
||||
*
|
||||
* @param string $title The plain text search query to search for a movie. Remember to URI encode this!
|
||||
* @param int $limit The amount of movie search results to show per page.
|
||||
* @param int $page The selected page of movie search results.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function searchMovie($title, $limit = 50, $page = 1)
|
||||
{
|
||||
return $this->_makeCall(
|
||||
'movies.json',
|
||||
[
|
||||
'q' => $title,
|
||||
'page_limit' => $limit,
|
||||
'page' => $page
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Detailed information on a specific movie specified by Id.
|
||||
* You can use the movies search endpoint or peruse the lists of movies/dvds to get the urls to movies.
|
||||
*
|
||||
* @param int $ID The RT ID.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMovie($ID)
|
||||
{
|
||||
return $this->_makeCall('movies/' . $ID . '.json');
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the reviews for a movie.
|
||||
* Results are paginated if they go past the specified page limit.
|
||||
*
|
||||
* @param int $ID The RT ID.
|
||||
* @param string $type Three different review types are possible:
|
||||
* "all", "top_critic" and "dvd".
|
||||
* "top_critic" shows all the Rotten Tomatoes designated top critics.
|
||||
* "dvd" pulls the reviews given on the DVD of the movie.
|
||||
* "all" as the name implies retrieves all reviews.
|
||||
* @param int $limit The number of reviews to show per page.
|
||||
* @param int $page The selected page of reviews.
|
||||
* @param string $country Provides localized data for the selected country (ISO 3166-1 alpha-2) if available.
|
||||
* Otherwise, returns US data.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getReviews($ID, $type = 'top_critic', $limit = 20, $page = 1, $country = 'us')
|
||||
{
|
||||
return $this->_makeCall(
|
||||
'movies/' . $ID . '/reviews.json',
|
||||
[
|
||||
'review_type' => $type,
|
||||
'page_limit' => $limit,
|
||||
'page' => $page,
|
||||
'country' => $country
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pulls the complete movie cast for a movie.
|
||||
*
|
||||
* @param int $ID The RT ID.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCast($ID)
|
||||
{
|
||||
return $this->_makeCall('movies/' . $ID . '/cast.json');
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a request to RT.
|
||||
*
|
||||
* @param string $function The type of request.
|
||||
* @param array $params Extra HTTP parameters.
|
||||
*
|
||||
* @return string JSON data from RT.
|
||||
*/
|
||||
private function _makeCall($function, $params = [])
|
||||
{
|
||||
return trim(
|
||||
Utility::getUrl([
|
||||
'url' => RottenTomato::API_URL .
|
||||
$function .
|
||||
'?limit=' .
|
||||
mt_rand(15, 20) .
|
||||
'&apikey=' .
|
||||
$this->_apikey .
|
||||
(!empty($params) ? ('&' . http_build_query($params)) : '')
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the RT api key.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getApiKey()
|
||||
{
|
||||
return $this->_apikey;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
<a href="{$smarty.const.WWW_TOP}/upcoming/5">DVD Releases</a>
|
||||
</p>
|
||||
|
||||
{if $data|@count > 0}
|
||||
{if isset($nodata)}
|
||||
{$nodata}
|
||||
{elseif $data|@count > 0}
|
||||
<table style="width:100%;" class="data highlight icons" id="coverstable">
|
||||
<tr>
|
||||
<th></th>
|
||||
|
||||
Reference in New Issue
Block a user