Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- _____ _____ _ _____ _____ _____ _____ _____ _____
- ___| | __ |_| _ |_ _|___ ___|_ _| __| _ | |
- |_ -| --| -| | __| | | |- _|___| | | | __| | | | |
- |___|_____|__|__|_|__| |_| |___| |_| |_____|__|__|_|_|_|
- |s C R i P T z - T E A M . i N F O|
- PiXHOST.ORG CLASSiC/COVER iMAGE UPLOAD
- */
- error_reporting(0);
- define("UPLOAD_TYPE", "CLASSiC"); //CLASSiC OR COVER
- //iF YOU USE COVER -> Picture must be higher than 350px!
- define("iMAGE", "logo.png"); //WHAT WE ARE GOiNG TO UPLOAD
- function get_img_tag($x)
- {
- $y = explode('[img]', $x);
- $y = explode('[/img]', $y[1]);
- $z = $y[0];
- return $z;
- }
- function get_img($x, $w)
- {
- $y = explode('value="', $x);
- $y = explode('"/>', $y[1]);
- $z = $y[0];
- return str_replace("/show", "/images", str_replace("http://www.", "http://img" . $w . ".", $z));
- }
- function get_img_thumb($x)
- {
- $y = explode('value="', $x);
- $y = explode('"/>', $y[2]);
- $z = $y[0];
- return get_img_tag($z);
- }
- function get_server($x)
- {
- return substr($x, 8, 1);
- }
- if (UPLOAD_TYPE == "CLASSiC") {
- $file = dirname(__FILE__) . "/". iMAGE;
- $curl = curl_init();
- curl_setopt_array($curl, array(
- CURLOPT_URL => 'http://www.pixhost.org/classic-upload/',
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_REFERER => 'http://www.pixhost.org/classic-upload/',
- CURLOPT_CONNECTTIMEOUT => 30,
- CURLOPT_TIMEOUT => 30,
- CURLOPT_POST => true,
- CURLOPT_POSTFIELDS => array(
- 'img[]"; filename="' . basename($file) . '"' => "@" . $file,
- 'content_type' => '1',
- 'tos' => 'on',
- 'submit' => 'Upload'
- )
- ));
- $return = curl_exec($curl);
- curl_close($curl);
- $server_id = get_server(get_img_thumb($return));
- echo get_img_thumb($return) . "<br />";
- echo get_img($return, $server_id);
- }
- if (UPLOAD_TYPE == "COVER") {
- $file = dirname(__FILE__) . "/". iMAGE;
- $curl = curl_init();
- curl_setopt_array($curl, array(
- CURLOPT_URL => 'http://www.pixhost.org/cover-upload/',
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_REFERER => 'http://www.pixhost.org/cover-upload/',
- CURLOPT_CONNECTTIMEOUT => 30,
- CURLOPT_TIMEOUT => 30,
- CURLOPT_POST => true,
- CURLOPT_POSTFIELDS => array(
- '0"; filename="' . basename($file) . '"' => "@" . $file,
- 'content_type' => '1',
- 'tos' => 'on',
- 'submit' => 'Upload'
- )
- ));
- $return = curl_exec($curl);
- curl_close($curl);
- $server_id = get_server(get_img_thumb($return));
- echo get_img_thumb($return) . "<br />";
- echo get_img($return, $server_id);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement