Quick PHP Help

Miscellaneous Forums/General Discussion/Quick PHP Help

I have a script on host A that runs to do something. I need it to hit a script on host B and get the result.

For example, I have a keygen script that sits on bluehost. I have a website on dreamhost that needs to query that keygen script, get the result and continue along it's merry way.

What is the code to execute a php script located on a different host than what your running on?

You can use the the file read commands to load the url you want to execute. Check here:

http://www.tizag.com/phpT/fileread.php

So instead of reading a local file, you just use a URL instead, like in the following:

$myFile = "http://www.myurl.com/myfile.php";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData;


ahhh, I remember now... Thanks!!!! I couldn't think of it for the life of me and I kept doing google searches up the wing-wang.....

Thanks Again!