Skip to content

Commit

Permalink
Invalid show URL handling
Browse files Browse the repository at this point in the history
Redirects to home page with error="invalidshow"
  • Loading branch information
athuler committed Feb 9, 2024
1 parent 3c92d68 commit 27ab79f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@
// Scrape Ticketing Webpage
$opts = array('http'=>array('header' => "User-Agent:" . $_SERVER['HTTP_USER_AGENT']));
$context = stream_context_create($opts);
$file = file_get_contents($url,false,$context);
$file = @file_get_contents($url,false,$context);

// Check if content is valid
if($file === FALSE) {
header("Location: ./?error=invalidshow");
}

$cookies = array();
foreach ($http_response_header as $hdr) {
Expand Down

0 comments on commit 27ab79f

Please sign in to comment.