PHP Classes

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Jakub Pezacki  >  HTTPS Request send files & custom headers  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example of use
Class: HTTPS Request send files & custom headers
Send HTTP requests with files or custom headers
Author: By
Last change:
Date: 7 years ago
Size: 359 bytes


Class file image Download

require_once 'HttpsRequest.class.php';
//send file

$request = new HttpsRequest($user,$pass);
$request->send_file($url, '/home/ftp/playftp/tmp/'.$file);

//send custom headers
$headers = array();
$headers[] = "ReportName: Order";
$headers[] = "NumberOfDays: 1";

$res = $request->send_custom_headers($url,$headers);