/** * Download Player Matches * * @return Response */ public function matches(Request $request) { $match_player_id = $request->input('player_id'); $ss = new Scraper(); $ss->get_matches($match_player_id); $match = Match::where('player2_id', '=', $match_player_id)->get(); return redirect('admin/scraper'); }
$mode = Request::get('hub_mode'); $token = Request::get('hub_verify_token'); //dd($token); if ($mode == 'subscribe' && $token == 'splat') { return response($challenge, 200); } else { echo "Failed validation. Make sure the validation tokens match."; return response("content", 403); } }); //APIs Route::get('api/profile/download', function () { $player_id = (int) Input::get('playerID'); //dd($player_id); //call scraper $s = new Scraper(); $s->get_player($player_id); return ""; }); Route::get('api/profile/image', function () { $player_id = (int) Input::get('playerID'); if (get_headers('http://www.r2sports.com/tourney/imageGallery/gallery/player/' . $player_id . '_normal.jpg')[0] != 'HTTP/1.1 404 Not Found') { $profile = 'http://www.r2sports.com/tourney/imageGallery/gallery/player/' . $player_id . '_normal.jpg'; } else { $profile = '/images/racquet-right.png'; } return $profile; }); Route::get('api/rankings/history', function () { $player_id = (int) Input::get('player_id'); $group_id = Input::get('group_id');