Jump to content

9999

Members
  • Posts

    99
  • Joined

  • Last visited

    Never

Posts posted by 9999

  1. How do you name your pages like this?:

    www.mysite.com/?pageid=1

    www.mysite.com/?pageid=2

     

    Instead of the normal way:

    www.mysite.com/page1.php

    www.mysite.com/page2.php

     

    Also, what are  the advantages/disasdvantages of this and how does this effect the way search engines view the page?

  2. How would I put a custom google search script inside this if-then statement.  I need to end php, insert html google code, then restart php while inside the if-then statement.  This is what I have so far:

     

     

    <?php
    
    // some stuff here
    
        if ($count == 0) {
    
            echo "No results were found for your search, please try the google search instead:";
    
            <!-- Search Google -->
                    Custom google search script code goes here
            <!-- Search Google -->
    
        }
    
    // some more stuff here
    
    ?>

  3. Ok, sorry for not responding last week, I was out of town.

     

    I have created and uploaded 365 images (one for each day of the year).

     

    I name my orginal images like this: "dec11.gif", "dec12.gif", "dec13.gif", "dec14.gif" and so on..

     

    Then I use this php script which we can call "daily.php" to match the current date (using the "Mj" date formatting system) to the image saved that corresponds to the date.  It then creates the "image3.gif" and saves it to the server.  I use CRON to automatically run this script at midnight daily.

     

    Code for "daily.php"

    <?php
    $im = imagecreatefromgif("".date("Mj").".gif"."");
    imagegif($im,"image3.gif");
    ?>

     

    I then give out the code which references "image3.gif"

     

    Image3.gif is the only image that will always change every day.

     

    With this in mind, how would I implement the suggestions you guys previously mentioned so it would work not only on regular websites but social networking sites such as myspace that don't allow JavaScript, Meta tags, or Server Side Language.

     

    Thanks.

  4. I have this code I want to give users to display on their websites or myspace pages.  Its bascically some images.  However, the content of one of the images changes daily even though its name will remain the same.

     

    <TABLE border=1>
    <TR><TD><IMG border=0 src="http://www.mysite.com/image1.gif"></TD></TR>
    <TR><TD><IMG border=0 src="http://www.mysite.com/image2.gif"></TD></TR>
    <TR><TD><IMG border=0 src="http://www.mysite.com/image3.gif"></TD></TR>
    <TR><TD><IMG border=0 src="http://www.mysite.com/image4.gif"></TD></TR>
    <TR><TD><IMG border=0 src="http://www.mysite.com/image5.gif"></TD></TR>
    </TABLE>

     

    Is there some simple code or script that I can include with my code to either prevent the images from caching and/or force a visitors browser to load current images?

     

    Thanks

  5. Maybe I should have explained everything differently.  What I want to do is take the result of this php file: http://www.dailyscripturecards.com/daily.php which is literally this:

     

    Let not your heart be troubled: ye believe in God, believe also in me. In my Father's house are many mansions: if it were not so, I would have told you. I go to prepare a place for you. And if I go and prepare a place for you, I will come again, and receive you unto myself; that where I am, there ye may be also.

    John 14: 1-3 (October 29)

     

    Can you give me the code that would take that text output and put it in a box, thereby creating an image.  Then that image needs to be saved on the server. Thanks.

  6. OK lets try this php file:  http://www.dailyscripturecards.com/daily.php

     

    I want to take the output of that file

     

    Let not your heart be troubled: ye believe in God, believe also in me. In my Father's house are many mansions: if it were not so, I would have told you. I go to prepare a place for you. And if I go and prepare a place for you, I will come again, and receive you unto myself; that where I am, there ye may be also.

    John 14: 1-3 (October 29)

     

    and create an image out of it and save it to the server.  Does this help?

  7. OK, here is what i have.  This is what I want my php output to look like: http://www.dailyscripturecards.com/daily2.php when done.

     

    Instead of outputting it like the example above in which I used a table with a black background color, I want my php file above to just output the text.  Then I will take the php script with the image create and use the outputted text from daily2.php and place that inside of the black box it creates then save the whole thing to the server.

  8. want to tke the output of php file and write image and save to server.

     

    <?php
    $file = file_get_contents('http://www.myfile.php');
    $im = imagecreate(325, 160);
    
    $bg = imagecolorallocate($im, 0, 0, 0);
    $textcolor = imagecolorallocate($im, 255, 225, 255);
    
    imagestring($im, 5, 0, 0, $file, $textcolor);  // write the string at the top left
    
    header("Content-type: image/gif");  // output the image
    
    imagegif($im,"new_image.gif",80);  // save the image to server
    ?>

  9. I can get this to work if I manually type in some text and assign it to the $text variable.  When I try to assign a file to the text variable all that is displyed is "array".

     

    Also, what would be the correct way for me to save the image as "testimage.gif"?

     

    <?php
    
    $text = file('myfile.php');  // file used for output data
    
    $im = imagecreate(325, 160);  // create a 325*160 image
    
    $bg = imagecolorallocate($im, 0, 0, 0);  // black background color
    $textcolor = imagecolorallocate($im, 255, 215, 0);  // gold text color
    
    imagestring($im, 5, 0, 0, $text, $textcolor);  // write the string at the top left
    
    // output the image
    header("Content-type: image/gif");
    imagegif($im);
    
    // save the image
    imagegif($img,"testimage.gif",80);
    
    ?>

     

    Thanks

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.