Hi
I need a Shell script that will download a text file every second from a http server using wget.
Can anyone provide me any pointers or sample scripts that will help me go about this task ???
regards
techie (1 Reply)
Hello Everyone,
I'm trying to use wget recursively to download a file.
Only html files are being downloaded, instead of the target file.
I'm trying this for the first time, here's what I've tried:
wget -r -O jdk.bin... (4 Replies)
Hi All
I want to download srs8.3.0.1.standard.linux24_EM64T.tar.gz file from the following website :
http://downloads.biowisdomsrs.com/srs83_dist/
But this website contains lots of zipped files
I want to download the above file only discarding other zipped files.
When I am trying the... (1 Reply)
I need to download the following srs8.3.0.1.standard.linux26_32.tar.gz file from the following website:
http://downloads.biowisdomsrs.com/srs83_dist
There are many gzip files along with the above one in the above site but I want to download the srs8.3.0.1.standard.linux26_32.tar.gz only from... (1 Reply)
Hi,
I want to download some online data using wget command and write the contents to a file.
For example this is the URL i want to download and store it in a file called "results.txt".
#This is the URL.
$url="http://www.example.com";
#retrieve data and store in a file results.txt
... (3 Replies)
Ok, this is quite weird.
wget -r mysite.com/mylink/
should get all the files recursively from the 'mylink' folder.
The problem is that wget saves an index.html file!
When I open this index.html with my browser I realize that it shows all the files in the current folder (plus an option to move... (3 Replies)
Hi
I need a Shell script that will download a zip file every second from a http server but i can't use neither curl nor wget.
Can anyone will help me go about this task ???
Thanks!! (1 Reply)
Hi
I am trying to download the file using wget command. But The password was created as pwd$$ for the user xyz. When i give the command as below it is not downloading the file. Will the password has $$ causing this issue.
wget... (0 Replies)
Hello all,
I want to write auto update script for my embedded device, which can check and download newer version of my program and extract the files on the device.
The download center is hosted on remote web server .
Script checks the hosted file on web site and if the new version is there... (8 Replies)
Hi All,
I am trying to download a XML from a URL through wget and successful in that but the problem is that I have to check for some special characters inside that XML. But when I download through wget it transfers the content of the XML in plain text and I'm not able to search for those... (2 Replies)
Discussion started by: dips_ag
2 Replies
LEARN ABOUT PHP
rar_open
RAR_OPEN(3) 1 RAR_OPEN(3)RarArchive::open - Open RAR archive
Object oriented style (method):
SYNOPSIS
publicstatic RarArchive RarArchive::open (string $filename, [string $password = NULL], [callable $volume_callback = NULL])
DESCRIPTION
Procedural style:
RarArchive rar_open (string $filename, [string $password = NULL], [callable $volume_callback = NULL])
Open specified RAR archive and return RarArchive instance representing it.
Note
If opening a multi-volume archive, the path of the first volume should be passed as the first parameter. Otherwise, not all files
will be shown. This is by design.
PARAMETERS
o $filename
- Path to the Rar archive.
o $password
- A plain password, if needed to decrypt the headers. It will also be used by default if encrypted files are found. Note that the
files may have different passwords in respect to the headers and among them.
o $volume_callback
- A function that receives one parameter - the path of the volume that was not found - and returns a string with the correct path
for such volume or NULL if such volume does not exist or is not known. The programmer should ensure the passed function doesn't
cause loops as this function is called repeatedly if the path returned in a previous call did not correspond to the needed volume.
Specifying this parameter omits the notice that would otherwise be emitted whenever a volume is not found; an implementation that
only returns NULL can therefore be used to merely omit such notices.
Warning
Prior to version 2.0.0, this function would not handle relative paths correctly. Use realpath(3) as a workaround.
RETURN VALUES
Returns the requested RarArchive instance or FALSE on failure.
CHANGELOG
+--------+-----------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+-----------------------------+
| 3.0.0 | |
| | |
| | $volume_callback was added. |
| | |
+--------+-----------------------------+
EXAMPLES
Example #1
Object oriented style
<?php
$rar_arch = RarArchive::open('encrypted_headers.rar', 'samplepassword');
if ($rar_arch === FALSE)
die("Failed opening file");
$entries = $rar_arch->getEntries();
if ($entries === FALSE)
die("Failed fetching entries");
echo "Found " . count($entries) . " files.
";
if (empty($entries))
die("No valid entries found.");
$stream = reset($entries)->getStream();
if ($stream === FALSE)
die("Failed opening first file");
$rar_arch->close();
echo "Content of first one follows:
";
echo stream_get_contents($stream);
fclose($stream);
?>
The above example will output something similar to:
Found 2 files.
Content of first one follows:
Encrypted file 1 contents.
Example #2
Procedural style
<?php
$rar_arch = rar_open('encrypted_headers.rar', 'samplepassword');
if ($rar_arch === FALSE)
die("Failed opening file");
$entries = rar_list($rar_arch);
if ($entries === FALSE)
die("Failed fetching entries");
echo "Found " . count($entries) . " files.
";
if (empty($entries))
die("No valid entries found.");
$stream = reset($entries)->getStream();
if ($stream === FALSE)
die("Failed opening first file");
rar_close($rar_arch);
echo "Content of first one follows:
";
echo stream_get_contents($stream);
fclose($stream);
?>
Example #3
Volume Callback
<?php
/* In this example, there's a volume named multi_broken.part1.rar
* whose next volume is named multi.part2.rar */
function resolve($vol) {
if (preg_match('/_broken/', $vol))
return str_replace('_broken', '', $vol);
else
return null;
}
$rar_file1 = rar_open(dirname(__FILE__).'/multi_broken.part1.rar', null, 'resolve');
$entry = $rar_file1->getEntry('file2.txt');
$entry->extract(null, dirname(__FILE__) . "/temp_file2.txt");
?>
SEE ALSO
rar:// wrapper.
PHP Documentation Group RAR_OPEN(3)