You are here: Re: want to use php to alternate links « PHP Language « IT news, forums, messages
Re: want to use php to alternate links

Posted by Peter Van Hove on 06/02/05 15:37

1.
Static yes. Understood. Changing everything is not an option right now
because I need the same page-names and extensions for
link-from-outside-purposes.
If I change them to php all the links to these pages will be lost.

So what do you think about this :

Because I only want to use this mechanism to links going out, not to pages
on the same domain (no relative links), and I think I will launch them all
in a new browser window (so not inside an existing frame or anything), ...
Wouldn't it be a good idea to simply launch the page each time from one .php
page, depending on the input the page gets (the 'p' variable).
So, in the html the out-going link would in fact be a relative link to
"link.php" but with a variable, e.g p=2 and also in the html I would need to
make sure the link is launched in a new brower window, and then the link.php
page would do the actual replacing of the file on the remote server ?

Does this make sense ? I tink I can get that to work but then I need to
know how in the "link.php" page I load the content of another page.

2. When the day starts is not a problem, can be CET, UST, PDT, MDT, CDT,
EDT, ... whatever, as long as it's consistent.

>> > Do you need a push on how to actually code this. If so, are you wanting
>> > to
> store count data in cookies/sessions or in a database?

I have no clue how to start. It should be server side entirely, so no
cookies but databases scare me senseless, I have NO idea how to go about
that, set it up or ...
For all I care it's simply stored in a txt file on the server somewhere, but
you tell me what's best ?

-------------------------------------------------------
"James David" <solar@infidel.ixx> wrote in message
news:2ECne.90623$w15.86392@tornado.tampabay.rr.com...
> "Peter Van Hove" <Will_Bounce_So_Use_My_First_Name@Smart-Projects.net>
> wrote
> in message news:6gCne.108188$%S1.6345795@phobos.telenet-ops.be...
>
>> 1.
>> Throughout all my *.html pages replace a certain link to (e.g.)
> link.php?p=2
>> so replace the actual link to a link which is "provided" by the php code.
>
> The *.html is static right? Therefore, you have to make these pages
> function
> dynamically which, ISTM, can only be done by 1) manually changing all
> pages,
> 2) devising a way to automatically generate new *.html files, or 3)
> converting these files in question to *.php files
>
> From what I understand, #3 is your only option because you're going to
> have
> to use an "if" or "switch-case" statement to determine which links you'd
> like to display.
>
>> 2
>> In the php code I would also like to take counters in account, on daily
>> basis.
>> For instance, if a counter is incremented to 5, then this link has done
> its
>> work, now use another link to another domain etc.
>> So, the counters would need to be reset somehow on daily basis.
>> The idea is to have no human interaction anymore after the stuff is
> active.
>
> Mechanically, this is not a difficult problem once you get some momentum
> going. The difficulty here is determining where your days break assuming
> that you may have people all over the world looking at your site.
>
> Include this counter and link logic on each *.php page with alternating
> links.
>
> Do you need a push on how to actually code this. If so, are you wanting to
> store count data in cookies/sessions or in a database?
>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация