• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • Last Modified:

Auto complete page Adress

http://www.saudimeta.com/txt/arabic/SAUDIMETA_AR_DAY_27_04_2006.txt
I want to open above link page direct with a part of its adrees

example:
http://www.saudimeta.com/txt/arabic/SAUDIMETA_AR_DAY

I do not like to determine the date every day.
0
sal1150
Asked:
sal1150
  • 2
  • 2
1 Solution
 
soapergemCommented:
Um...what? The second link gives a 404 error, and I don't understand your question at all. Please explain in much more detail.
0
 
sal1150Author Commented:
0
 
ixtiCommented:
create a subdir called "SAUDIMETA_AR_DAY"in "arabic"
Then create an index.php theer with the following:
<?php
$todate = date("d_m_Y");
header("Location: http://www.saudimeta.com/txt/arabic/SAUDIMETA_AR_DAY_{$today}.txt");
exit();
?>

or something like this:
<?php
$last_date = date("d_m_Y");
$file = "../SAUDIMETA_AR_DAY_[%DATE%].txt";
while (!file_exists(str_replace("[%DATE%]", $last_date)) {
    if (!isset($step)) $step = 1;
    $last_date = date("d_m_Y", strtotime("Now -". $step++ . " Days"));
}
$file = str_replace("[%DATE%]", $last_date);
require_once $file;
exit();
?>
0
 
sal1150Author Commented:
hi ixti,
how can I creat subdir???
it is not my site.

I want function to give me the current 'txt' file by this link
(http://www.saudimeta.com/txt/arabic/SAUDIMETA_AR_DAY
0
 
ixtiCommented:
create a file on your local server

<?php
$todate = date("d_m_Y");
echo "<a href="http://www.saudimeta.com/txt/arabic/SAUDIMETA_AR_DAY_{$today}.txt">http://www.saudimeta.com/txt/arabic/SAUDIMETA_AR_DAY_{$today}.txt</a>";
?>
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now