Add data from remote php file in signature

Dynamic

Well-known member
Hello,

Please note that I am not a coder by any means, and so far have gotten my information from Google.


I would like to add a custom user field to user profiles where they can include a remote .txt file link (http://www.example.com/textfile.txt). This I am able to do not a problem.

Then, I would like the text located in that file to be displayed in the users signature. I can get the raw data using a bit of php.

Code:
<?PHP
    $file = fopen("http://www.example.com/textfile.txt", "rb");
    $output = '';
    while (!feof($file)) {
        $output .= fread($file, 8192);
    }
    fclose($file);
    echo($output);
?>

So, now that displays the remote text files text. Is there a way to do this by placing the code in the signature? So each users signature will display their chosen text file (in addition to their normal xenforo signature).

And if possible, is there a way to format the text in bbcode?

Thanks.
 
If you use BBCode to fetch it, it's a matter of running it through the parser. I have a "Comprehsive Guide" that should help you.
 
Top Bottom