FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Problem with url redirecting





kk_loke86
I try to redirect my page to another website by using include and the site`s url. My code is something like this:

Code:

<?php include($redirect_url); ?>


where $redirect_url=http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?lvl=0&id=3617

I try on my localhosr server and get the following warnings:

Warning: include() [function.include]: URL file-access is disabled in the server configuration in D:\wamp\www\natural protein database\redirect.php on line 13

Warning: include(http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?lvl=0) [function.include]: failed to open stream: no suitable wrapper could be found in D:\wamp\www\natural protein database\redirect.php on line 13

Warning: include() [function.include]: Failed opening 'http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?lvl=0' for inclusion (include_path='.;C:\php5\pear') in D:\wamp\www\natural protein database\redirect.php on line 13

Can anyone help me to solve this problem? By the way, does frihost allow me to do something like that in my website?
kv
Use header method instead.

Ex:

Code:

<?php
header("Location: $redirect_url");
?>


Make sure you call header function before any output.

Manual:

http://php.net/header
kk_loke86
But I want to show the redirected page as one of the part in my own webpage...
rvec
then you have to use curl
http://nl3.php.net/curl
kk_loke86
I try to create a link on my webpage so that when it is clicked, it redirect to one of my page where a part of the page acting just like an ordinary browser to view the page of other website.

The url of the website is stored in my database and I will have to concate the url with some variables so my url is a variables with each time having different parameters.

I have read the pages about curl...but it just create a source text file of the webpage entirely with the website`s links are all disabled.

I am really a newbie on curl... don`t know how to use it.
kv
quickest solution is to use frames. you can split the browser into multiple frames and display the content of link clicked in one of the frames.

A more complicated one would be to use iframes. But not all browsers support iframes, and different browsers handle it in different ways.

Both of the above are client side solutions. if you need a server side solution, you have to learn curl.
Related topics
problem with internet explorer
Problem Help out
PHPNuke problem.
EyeShield21
Got a new domain
Book Recommendations
Suggestion -> A small one though
my site?
I am American...
PLEASE HELP
Can I install Coppermine in DirectAdmin?
Help-Digital Camera selection
CSS div alignment issue, IE and FF (newbie problem)
Porta trouble
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.