|
-
May 13th, 2007, 09:41 PM
#1
Thread Starter
WiggleWiggle
[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.";
}
My usual boring signature: Something
-
May 14th, 2007, 03:15 PM
#2
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.
-
May 14th, 2007, 10:26 PM
#3
Thread Starter
WiggleWiggle
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.
My usual boring signature: Something
-
May 15th, 2007, 02:38 AM
#4
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
}
?>
-
May 15th, 2007, 08:20 PM
#5
Thread Starter
WiggleWiggle
Re: [RESOLVED] Variable from remote page
oh ok. Thanks
My usual boring signature: Something
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|