Results 1 to 3 of 3

Thread: Looking for a Dynamic Text/Image Replacement

  1. #1
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts

    Looking for a Dynamic Text/Image Replacement

    I would like to find a script that works sort of like the sample below



    right now it works like this if input
    PHP Code:
    http://alviras.com/test/heading.php?text= 
    then add what text you like to the end of the url it will show that if you use the add image feature

    I would like to have the same idea but work from a text a file so it can updated or changed without the need to edit a post only edit the text file and it will show the changes live in the post.

    I am just having zero luck locating one.


    found one I got a while back and its a tad better but doesn't work off a text file



    Still searching for this elusive unicorn

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  2. #2
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    Here is a simple php dynamic image script I just whipped up which can pull a string from a text file. The problem with it lies in the fact that image dimensions must be defined in the script, so of course varied string lengths and/or text sizes will pose problems in image dimensions which will then still need to be edited when ever you update the string.. so not really going to work for ya..but thought i'd share it any way.

    PHP Code:
    <?php
    header
    ("Content-type: image/jpeg");

    //define txt file path
    $file 'string.txt';

    //define font path
    $font 'arialbd.ttf';

    //get string from txt file
    if($mystring=file_get_contents($file))

    //create image, parameters (width,height)
    $img imagecreate(325,25);
    //define colors and fill
    $bgcolor imagecolorallocate($img,255,255,255);
    $textcolor imagecolorallocate($img,100,100,100);
    imagefill($img,0,0,$bgcolor);

    //add string to image
    //parameters are (image, font-size, angle, x-coordinate, y-coordinate, color, font, string)
    imagettftext($img2001020$textcolor$font$mystring);

    imagejpeg($img);
    imagedestroy($img);
    ?>
    But if I could see your current script, it'd probably be possible to edit in changes to allow it to pull from a text file. So if you'd like for me to try that, let me know

    Cheers!

  3. #3
    rldowling03's Avatar
    rldowling03 is offline Newbie Net Builder
    Join Date
    Jan 2009
    Location
    Adelaide, Australia
    Posts
    25
    Thanks
    1
    Thanked 1 Time in 1 Post
    Hey Mr.Bill

    You know if you want something done you can contact me.

    I can do this for you after I have finished with some of your other stuff, or before if you like

Similar Threads

  1. Wanted: Outlook Express replacement
    By UncleP in forum Tech-Talk
    Replies: 4
    Last Post: 5 January, 2011, 10:51 AM
  2. WordPress Curl Replacement
    By Andy101 in forum Programming
    Replies: 0
    Last Post: 12 October, 2010, 15:37 PM
  3. Image vs text
    By neverlast in forum Web Proxies
    Replies: 1
    Last Post: 30 November, 2009, 05:11 AM
  4. Text/Image Ads or both?
    By ProxySites.ca in forum Web Proxies
    Replies: 8
    Last Post: 3 November, 2009, 19:34 PM
  5. Replies: 0
    Last Post: 27 October, 2009, 11:29 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •