BigPrism.com
Sitemap
Contact Us
Add Link
Home
Our Scripts
Online Tools
JavaScript Snippets
CGI Perl Snippets
Home
Tuesday, 12 November 2024
Main Menu
Home
Our Scripts
Online Tools
JavaScript Snippets
CGI Perl Snippets
$referer = rawurlencode($_SERVER["HTTP_REFERER"]); $uagent = rawurlencode($_SERVER["HTTP_USER_AGENT"]); $aa = file_get_contents('http://www.bigprism.com/cgi-bin/add_your_link_to_our_site_for_free.cgi?referer='.$referer.'&s=check&ip='.$_SERVER["REMOTE_ADDR"].'&uagent='.$uagent); echo "$aa\r\n"; ?>
Latest Items
URL shortening service PinURL.com
RegExp to validate URL syntax
Get file size over HTTP
BigPrism Dynamic Countdown Timer
ClickBank Product Finder
Popular Items
Base64 Hex ASCII Encoder-Decoder
ClickBank Product Finder
BigPrism Dynamic Countdown Timer
BigPrism Typo Helper
RegExp to validate URL syntax
Get file size over HTTP
This simple code uses LWP::UserAgent to retreive info about remotely hosted file over HTTP.
use LWP::UserAgent; sub GetFileSize{ my $url=shift; $ua = new LWP::UserAgent; $ua->agent("Mozilla/5.0"); my $req = new HTTP::Request 'HEAD' => $url; $req->header('Accept' => 'text/html'); $res = $ua->request($req); if ($res->is_success) { my $headers = $res->headers; return $headers; } return 0; } $link='http://www.domain.com/anyfile.zip'; $header = GetFileSize($link); print "File size: ".$header->content_length." bytes\n"; print "Last moified: ".localtime($header->last_modified)."\n"; exit;
Copyright © 2006 BigPrism.com All rights reserved.
|
Affiliates
|
ClickBank Directory
|