Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- #########################################################################
- # MaJyx Scanner PHP Proxy #
- # Version: 1.0.0.0 #
- # Date: 08/12/02015 #
- # Creator: HeavenSleep #
- # Website: http://www.majyx.net/ #
- #########################################################################
- if(isset($_FILES['file'])){
- $file_name = htmlentities(basename($_FILES['file']['name']));
- $file_path = $_FILES['file']['tmp_name'];
- $scan = scanFile($file_path);
- echo($scan);
- }
- function scanFile($file_path) {
- $id='YourID';
- $token='YourToken';
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_URL, "http://v2.scan.majyx.net/scan.php?version=2");
- curl_setopt($ch, CURLOPT_POST, true);
- $post = array(
- 'token'=>$token,
- 'id'=>$id,
- 'file'=>'@'.$file_path,
- );
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
- $result = curl_exec($ch);
- $err = curl_errno($ch);
- $errmsg = curl_error($ch);
- if(!empty($err)){
- $result = $errmsg;
- }
- curl_close($ch);
- return $result;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement