Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Commit

Permalink
Some changes
Browse files Browse the repository at this point in the history
Signed-off-by: Roland Haeder <[email protected]>
  • Loading branch information
Quix0r committed May 20, 2015
1 parent be51137 commit aca3c86
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion resources/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@
$result = curl_exec($curl);
$result_info = curl_getinfo($curl);

syslog(LOG_INFO, 'result_info=' . json_encode($result_info));

if(curl_errno($curl)) {
echo 'CURL ERROR: '.curl_error($curl);
}

curl_close($curl);

header('Content-Type: '.$result_info['content_type']);
header('Content-Type: ' . $result_info['content_type']);

if ((isset($qc_redir[0]) && $qc_redir[0] == 'qc_redir') || (isset($tbd[0]) && $tbd[0] == 'tbd')) {
preg_match('/\d\d\d/', $result, $status_code);
Expand All @@ -104,6 +106,10 @@

// Don't miss exit() as the server redirect doesn't abort the script
exit();

default:
syslog(LOG_WARNING, 'Status code ' . $status_code[0] . ' found.');
break;
}
}

Expand Down

0 comments on commit aca3c86

Please sign in to comment.