Jump to content

Archived

This topic is now archived and is closed to further replies.

matfish

Clicking a new link...

Recommended Posts

Hi,

Iv got a list of URLs in an array which I randomly choose, but how do you navigate to it? Like when Iv randomly chosen one, how do I kinda "Click it"?

Many thanks

Share this post


Link to post
Share on other sites
What do you mean click it?

Do you want the browser to go to the URL?
Do you want to check if the URL is valid?
Do you want to get the page the URL is pointing to?

Share this post


Link to post
Share on other sites
Just echo it in a link...

[code=php:0]echo "<a href=\"{$array[0]}\">My Link</a>";
[/code]

Regards
Huggie

Share this post


Link to post
Share on other sites
Hi, thanks for the replies.

I have a list of URLs which are all valid etc.. I just want to randomly select one and automatically navigate to it (so dont want to manually click it)

Many thanks

Share this post


Link to post
Share on other sites
In that case use the header() function.

[code=php:0]header("Location: $array[0]");
[/code]

Regards
Huggie

Share this post


Link to post
Share on other sites
Thanks for the reply,

There no other way? How about selecting a URL and kind of making a iframe navigate to it?

Thanks

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.