PasteSite.Com

Recent Pastes

Sign Up!

PasteSite is open to the public, but with limited features. Register to be able to modify access rights, track your pastes and more...

Change the theme

If you prefer reading light text on a dark background to dark text on a light background, then you might want to try the dark theme.

Banjo's Recent Pastes

"Re: Re: #9946" (VBScript) view

  1. Public Class Form1
  2.  
  3.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  4.         '// The button where it happens.
  5.         Clipboard.SetText(UploadFile("ftp://mysite.com/", "User@mysite.com", "Password", "Files", "http://mysite.com/", 120000, "C:\Users\Creme\File.txt"))
  6.     End Sub
  7.  
  8.     Public Function UploadFile(ByVal Host As String, ByVal Username As String, ByVal Password As String, ByVal Directory As String, ByVal Website As String, ByVal Timeout As Integer, ByVal FilePath As String) As String
  9.         ' Uploads the file.
  10.         My.Computer.Network.UploadFile(FilePath, Host & "/" & Directory & "/" & System.IO.Path.GetFileName(FilePath), Username, Password, True, Timeout, FileIO.UICancelOption.ThrowException)

"Re: #9946" (VBScript) view

  1.     Public Function UploadFile(ByVal Host As String, ByVal Username As String, ByVal Password As String, ByVal Directory As String, ByVal Website As String, ByVal Timeout As Integer, ByVal FilePath As String) As String
  2.         ' Uploads the file.
  3.         My.Computer.Network.UploadFile(FilePath, Host & "/" & Directory & "/" & System.IO.Path.GetFileName(FilePath), Username, Password, True, Timeout, FileIO.UICancelOption.ThrowException)
  4.  
  5.         ' Returns the url.
  6.         Return (Website & "/" & Directory & System.IO.Path.GetFileName(FilePath))
  7.     End Function
  8.  
  9.     ' This function would be used like this.
  10.     UploadFile("ftp://mysite.com/", "User@mysite.com", "Password","Files", "http://mysite.com/",120000,"C:\Users\Creme\File.txt")

"Untitled" (VBScript) view

  1.     Public Function UploadFile(ByVal Host As String, ByVal Username As String, ByVal Password As String, ByVal Directory As String, ByVal Website As String, ByVal Timeout As Integer, ByVal FilePath As String) As String
  2.         ' Uploads the file.
  3.         My.Computer.Network.UploadFile(FilePath, Host & "/" & Directory & "/" & System.IO.Path.GetFileName(FilePath), Username, Password, True, Timeout, FileIO.UICancelOption.ThrowException)
  4.  
  5.         ' Returns the url.
  6.         Return (Website & "/" & Directory & System.IO.Path.GetFileName(FilePath))
  7.     End Function
  8.  
  9.     ' This function would be used like this.
  10.     UploadFile("ftp://mysite.com/", "User@mysite.com", "Password","Files", "http://mysite.com/",120000,"C:\Users\Creme\File.txt")

"Untitled" (C/C++) view

  1. public static Bitmap ScreenRec(Rectangle Area)
  2. {
  3.     Bitmap tmpBtm = new Bitmap(Area.Width, Area.Height);
  4.  
  5.     using (Graphics G = Graphics.FromImage(tmpBtm)) {
  6.         G.CopyFromScreen(Area.Location, new Point(), Area.Size);
  7.     }
  8.  
  9.     return tmpBtm;
  10. }

"Untitled" (Plain Text) view

  1. ACTION = http://s3.tinypic.com/upload.php
  2. ENCTYPE =  multipart/form-data
  3. NAME = uploadForm
  4.  
  5.  
  6. UPLOAD_IDENTIFIER = 501016665_1250810212
  7. upk = 0b5caa43ecd6d0fe7ffec93548c1fc0a
  8. domain_lang = en
  9. action = upload
  10. MAX_FILE_SIZE = 500000000

"Untitled" (VBScript) view

  1.     Sub Main()
  2.         Main(Environment.GetCommandLineArgs())
  3.     End Sub
  4.  
  5.     Private Sub Main(ByVal args() As String)
  6.         If args Is Nothing OrElse args.Length <> 3 Then
  7.             Console.WriteLine("Syntax error.")
  8.         Else
  9.             If args(0) = "-v" Then
  10.                 Console.WriteLine("1.0.0.0")

"Untitled" (VBScript) view

  1. Imports System.Net
  2. Imports System.IO
  3.  
  4. Public Class Form1
  5.  
  6.  
  7.     ''API functions
  8.     Private Declare Function RegisterHotKey Lib "user32" (ByVal hwnd As IntPtr, ByVal id As Integer, ByVal fsModifiers As Integer, ByVal vk As Integer) As Integer
  9.     Private Declare Function UnregisterHotKey Lib "user32" (ByVal hwnd As IntPtr, ByVal id As Integer) As Integer
  10.  

"Untitled" (PHP) view

  1. <?php
  2. echo md5('Google') . file_get_contents('1.png');
  3. ?>

"Untitled" (Plain Text) view

  1. PNG
  2. 
  3.  
  4. IHDR    $  d҄  sRGB   gAMA  a    cHRM  z&        u0  `  :  pQ<  IDATx^tǕ|{핽}o6>:^??g{`,V%Q^E%Y,[%[AHY9I3 A  H"0z 33
  5. `fpq=3鮮ӿߺU͐?iiiiiih[
  6. fF5*JD3;vĤ
  7. ȿXNwA=J#GIL;L$ A!}a:tHL@|@|@|@|`)` &456::lddDL@|@|@|@|`!D, 촹
  8. &5<H
  9.  
  10.  

"Re: #9295" (PHP) view

  1. <?php
  2.   // Configuration - Your Options
  3.       $allowed_filetypes = array('.jpg','.gif','.bmp','.png'); // These will be the types of file that will pass the validation.
  4.       $max_filesize = 524288; // Maximum filesize in BYTES (currently 0.5MB).
  5.       $upload_path = './files/'; // The place the files will be uploaded to (currently a 'files' directory).
  6.  
  7.   $filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension).
  8.   $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); // Get the extension from the filename.
  9.  
  10.   // Check if the filetype is allowed, if not DIE and inform the user.

« Page: 2, 3, 4, 5, 6.. »