Txt

Byte sized tech know-how.

  • Home
  • About

Tag Archives: header

25 Apr

Force Download Dialog with PHP using octect-stream

Use this code to force a download of any type of content with PHP


header("Content-type:application/octect-stream");
header('Content-Disposition: attachment; filename=filename_' . date('Y-m-d') . '.sql');
print "Hello World";
admin Posted in Code, PHP content, download, header, octect, PHP, stream, web Leave a comment
10 Nov

Get URL Headers from Linux Command Line

Show the headers of an URL from the command line. This will need perl, lwp installed on the system.


lwp-request -ed "http://lindesk.com/"

URL Headers using Curl

admin Posted in Command Line, Linux, Perl command, header, headers, Linux, url Leave a comment
05 Oct

301 Redirect using PHP

301 Redirect using PHP


header ('HTTP/1.1 301 Moved Permanently');
header ('Location: '.$new_location);
admin Posted in Code, PHP 301, header, location, PHP, redirect Leave a comment
28 Sep

Get URL Headers using CURL

Show the headers of an URL using Curl


curl http://example.com -I
admin Posted in Command Line, Linux command, curl, header, link, Linux, url 1 Comment

Post navigation

Categories

  • Code
  • Command Line
  • Configuration
  • CSS
  • HTML
  • internet
  • JavaScript
  • Linux
  • Mobile
  • Perl
  • PHP
  • Python
  • Ruby
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Fruitful theme by fruitfulcode Powered by: WordPress
↑