[RESOLVED] Variable from remote page
basicly, i am trying to get a variable from a page on my server. I am doing this as copyright protection... but i cant seem to pass a variable from my page on the server, to the other page... here is my code:
PHP Code:
include("http://verify.subsoft.net/urlsnipper.php");
if($verify == "") {
echo $copyright;
echo "This site is no longer valid. Please contact SubSoft for more information.";
}
Re: Variable from remote page
you can't do that (at least not the way you want to). if you include a HTTP URL, you're including a PHP file that has already been parsed and turned into HTML/plain text by PHP. no variables really exist in it anymore. you need a copy of the script locally to be able to do what you want.
Re: Variable from remote page
oh ok. Well the purpose of the file is to test to see if the copy they have is legit and that they didnt remove the copyright notice.
Re: [RESOLVED] Variable from remote page
well, then you could just save the text of that page to a variable and search for the text that's supposed to be there.
PHP Code:
<?php
$str = "copyright blah blah blah";
$page = file_get_contents('http://website.com/page.php');
if(strpos($page, $str) !== false){
//it's there
}else{
//not there
}
?>
Re: [RESOLVED] Variable from remote page