So just to be sure I understand this. A user clicks on a link for [yoursite.com...]
You want to make the user wait for some period of time before you redirect them to [yoursite.com...]
And the wait time would be what? Seconds?
:: running around screaming in horror ::
You will, of course, not use anything remotely resembling this construction in your real code. I count three sets of ../ which is three more than anyone needs.
Normally wait time exists for a reason. For example, "You will be redirected to suchandsuch after five seconds" so the user knows what is happening. (Why the user needs to know this is not perfectly clear to me, since these pages never have a "click to forget the whole thing" option.) At a minimum, you're allowing time for the user to read something. What happens during the wait on your site? Preferably something other than "We're mad that you want to leave our site, so we're going to sulk for five seconds to punish you."
|Sorry but the URL you entered was not found to redirect anywhere. Please check the link and try again. |
... to which your average user will respond "Huh? I didn't enter anything, I just clicked on a link!"
|You want to make the user wait for some period of time before you redirect them to ... yoursite.com/somedir/adifferentfile |
Isn't it the other way around? If you click on a link to
you are first sent to
and sit there for some period of time before you're allowed to continue. I was thinking something like the "Leaving Facebook" page-- except there you have to take further action to say "Yes, yes, I really mean it."
OK you not get it right . this is little confusing ..
the code is not mine its from wordpress plugin her is it link [wordpress.org ]
As I said I know little about PHP and wordpress plugins ..if their is security issue in that script please let me know
and about ../../../wp-config.php path I think the author us it to reach wp-config.php on site root from current plugin path which is
waiting period will be 5 seconds and I done it now .
the page will continue promotional banner (not aggressive on of course )
This similar to what you see in adf.ly
To hide download link in first post page ..
make it as link from my site like example on my first post
I already done all that ..using Short URL Plugin wordpress Plugin .
And I add meta refresh instead of php redirect . so count down are work .
short link work too..
The only issue is short link add from plugin admin area not added automatically specially their is at less 260 link needed to modify .
I was thinking similar feature could be easy found on wordpress plugnis but look harder then what it look like .
|The only issue is short link add from plugin admin area not added automatically specially their is at less 260 link needed to modify. |
Can you say this again in different words please? I understand that you have many many links in this form, so you want something to happen automatically. You don't want to edit 260 posts.
|about ../../../wp-config.php path I think the author us it to reach wp-config.php on site root from current plugin path which is |
If you need to use the part of the code that refers to /wp-config.php then give a site-absolute URL like
:: shuffling papers ::
$_SERVER['DOCUMENT_ROOT'] . "/exact-path-here/wp-config.php"
Do you really need "if file exists" and "require" as entirely separate commands? It makes me think of those apache envelopes that say <IfModule...>. Either you've got the wp-config file or you haven't.
|I understand that you have many many links in this form, so you want something to happen automatically. You don't want to edit 260 posts |
the post like could changed frequency that mean I need to do it twice first on plugin admin are and the second on post links (some post have more then one link )
As I said This required developing another plugin that scan all posts link and change is to shorted links and store it on specified DB table .
about site-absolute URL looks like the plugin author [profiles.wordpress.org ] I think he done this part badly .
I delete hat like because I put u.php file on site root folder /html .
I ask you and any one else who have expert on wordpress is the code
require('wp-config.php'); safe to use .I search and found no one use it .
The file_exists and require are pretty standard PHP ways of doing things.
Whilst using ../../../ in a URL is a very bad idea, it's ta common way of doing things for PHP includes. Remember, this directive isn't going to generate a HTTP request, it's an internal filesystem fetch from one file to another within PHP. Since the software is installed in fixed folders, it's no big deal to use relative references to access other files within the filesystem.
Is the path relative to the php file that's doing the work, independent of where the visible outer file lives? (I have stubbed my toe many times on a fairly analogous situation: background images called from external css files shared by pages in various locations :()
Yes, it is relative to the PHP file where the directive is used. It has nothing at all to do with URLs or HTTP.
CSS, JS and images are requested using a URL and HTTP. In that case it is important to state the full path in the link, not use the ../ method.