I need a new page for my site. I've messed with js but to be honest, I'm not a coder.
The page will automte something for me, saving me valuable time.
When a visitor comes to the site, he or she clicks to see a scope reading. A js 'pops' a reading up for them. I have to upload these every day. Tiresome!!
I want the page to do this:
1. visitor chooses link. (eg aries)
2. Link gets server 'day' from date and adds it to .txt (eg 20.txt).
3. Script then seeks from file named 20.txt the ID of the scope to be displayed. (eg aries=123.txt)
4. The text of 123.txt is displayed in the web page each time it is called. Changing apropriately each (server) day.
I will still have lots of work to do each month but I'll only have to up-load 1 time, the data being stored in flat (txt) files on site.
The server is Unix and all cgi's, perls, asp and php run without any hitches.
Can you help me?
What will I do for you in return?
My site (check the profile) has had over 2.6 million hits in 18 months. It goes stonking crazy in Oct - Jan. I expect it to bring in another 2-3 million visitors this year. (Oct - Jan 2005)
Free front page link to your site on my top 2 pages, the home page and the horoscopes page.
I need a special page. Can you help?
Moderator: General Moderators
-
astrologer
- Forum Newbie
- Posts: 2
- Joined: Mon Jun 21, 2004 9:44 pm
- Location: Malaysia
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
Code: Select all
<?php
if(!$_GET['sign']){
$day = date('z');
if(file_exists("path/to/upload/files/$_GET['sign']-$day.txt")){
include("path/to/upload/files/$_GET['sign']-$day.txt"); #includes the file named aries-100.txt
}else{
echo "There was an error.";
}
}else{
echo "Show links to each star sign here with links like - mypage.com/page.php?sign=aries"
}
?>gemini-120.txt
cancer-85.txt
capricorn-364.txt
-
astrologer
- Forum Newbie
- Posts: 2
- Joined: Mon Jun 21, 2004 9:44 pm
- Location: Malaysia
Jason
Many thanks for your help. The sript you wrote however would mean that I would have to upload about 360 file each month having sought and renamed them.
Could you change the script to
1 seek out one of the 31 files I intend to upload. ie 1.txt - 31.txt
2 get from it the number of the file to be displayed ie aries = 123.txt or taurus = 312.txt
and
3 display the text of the defined txt file
The job you have done is really good but for the fact, there are 26 cards used in my astro-tarot and for each card, there are 12 different readings. total 312 readings and that doesn't account for the chinese or anything else.
Before you quit on me and turn your back, I really apreciate your help and will honour my promise of links (I will do more than 2) and your copyright to all instances of display. We could be talking about millions in just this year.
Looking forward to your reply.
Many thanks for your help. The sript you wrote however would mean that I would have to upload about 360 file each month having sought and renamed them.
Could you change the script to
1 seek out one of the 31 files I intend to upload. ie 1.txt - 31.txt
2 get from it the number of the file to be displayed ie aries = 123.txt or taurus = 312.txt
and
3 display the text of the defined txt file
The job you have done is really good but for the fact, there are 26 cards used in my astro-tarot and for each card, there are 12 different readings. total 312 readings and that doesn't account for the chinese or anything else.
Before you quit on me and turn your back, I really apreciate your help and will honour my promise of links (I will do more than 2) and your copyright to all instances of display. We could be talking about millions in just this year.
Looking forward to your reply.