Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to get my visitor when they visit my site to auto connect to the other site once

I did put this

<?php require_once("http://webtoconnect.com");  ?>

but I guess this code wouldn't work it just give me an error something like this

Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in /home/yoursn0w/public_html/tv/index.php on line 1

so I wonder how can I do to get my visitor stay in the same page but auto connect once to the site I want?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
211 views
Welcome To Ask or Share your Answers For Others

1 Answer

I'm not sure of what you mean by auto connect to the other site but if your goal is to include a remote page in php code you configuration should have the directive :

allow_url_include = On

in your php.ini (available since PHP 5.2.0. Note that directive is set to off by default due to security reason. By using this directive in a none safe environement (typically internet) you will be exposed to major security risk , be aware of that.

If your goal is just display a remote site to you visitor you can simply use an iframe like this :

<iframe src="http://google.fr" height="250" width="350"></iframe> 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...