Witty Plugin Hack? (3 posts)

  1. csmith
    Posted 11 years ago #

    Since I have no clue about php syntax, is there a way to hack the witty.php file to call a witty.txt file from another site?

    Thanks for your time,

  2. jwurster
    Posted 11 years ago #

    From looking at the php code, there are 2 lines of code that could be changed. You could change the file name
    $file_path = "witty.txt";
    to the name of your file like
    $file_path = "myfile.txt";
    and the path
    $witty_file = (ABSPATH . "wp-content/" . $file_path);
    to the http location like
    $witty_file = ("http://www.noname.com/stuf/" . $file_path);
    Then see what happens.
    However, you might want to email the author first.

  3. Cypher
    Posted 11 years ago #

    Be aware that if the plugin is probably using the "fopen" call to open the local file for reading and more and more hosts are disabling the ability of using "fopen" on remote files.

    So this plugin, when modified to read a remote file, might mysteriously fail to load the file. All's not lost though, in addition to making the change of reading a remote file, the plugin will have to use CURL to get access to the file which should work.


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.