Jump to content

JBS103

Members
  • Posts

    144
  • Joined

  • Last visited

    Never

About JBS103

  • Birthday 10/03/1989

Contact Methods

  • Website URL
    http://www.creativespeed.net

Profile Information

  • Gender
    Male
  • Location
    New York

JBS103's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. $unixTimestamp = strtotime("next Saturday"); And you can make that a displayable time using the php.net/date() function. For example: echo date("m d y", $unixTimestamp); I'm not sure I understand your other question.
  2. Well unless I am mistaken, it seems that your concept is valid and all that is holding you back is some mathematical mistake. Maybe posting some code will help us out. CRON would be the exact same thing but you wouldn't be forced to calculate all the time behind it. I think what you have is definitely usable, if I am not mistaken.
  3. For reference: I believe this is how it outputs as per notes on PHP.net. I cannot check as my host does not allow use of that function. Array[0] = Width Array[1] = Height Array[2] = Image Type Flag Array[3] = width="xxx" height="xxx" Array[4] = channels (PHP >= 4.3.0) Array[5] = bits (PHP >= 4.3.0) Array[6] = mime (PHP >= 4.3.0)
  4. Here is a quick hack at it... <?php //Get image //May want to eventually set up a conditional to check file type automatically. This only supports png at the moment. $im = imagecreatefrompng("php.png"); //Get height and width list($width, $height, $type, $attr) = getimagesize("php.png"); //Loop through each spot for($x = 0; $x < $width; $x++) { for($y = 0; $y < $height; $y++) { //Get the pixel $rgb = imagecolorat($im, $x, $y); //Change format -> #XXXXXX $total = sprintf('#%02X%02X%02X', ($rgb >> 16) & 0xFF, ($rgb >> & 0xFF, $rgb & 0xFF); echo "$x, $y = $total<br>"; } } ?> In action: www.creativespeed.net/test.php www.creativespeed.net/php.png I really don't know how solid this is. Someone else can definitely sure it up.
  5. This should work. No clue if it would be considered "good practice" or not. $var = substr(md5(mt_rand()), ; //or $var = substr(md5(time()), ;
  6. Just wanted to say that that is an extremely helpful post, Obsidian. Thanks a lot!
  7. As fert has shown, recursion is simply a defined function being used within its own definition. I'm sure there is a lengthy amount on wikipedia if you need to understand more, however, most of that information is probably way more than you need. Try a few simple examples on your own and you will see how it works very quickly.
  8. I tell ya, life ain't easy for a boy named Sue. I am not a country fan either, but a good acoustic guitar and some nice lyrics and I got no problems.
  9. You never closed the if <?php if ($numofsubs > 0) { ... } //Missing ?>
  10. The unlink() function will delete a file.
  11. <?php $colour = "#FF0000"; // this is just to test whether the background colour changes $cal_event_opentd = "<td align=center bgcolor=$colour><b>"; ?> You don't need the <?php echo ?> because you already have PHP open.
  12. <?php $messages[] = "The file is bigger than the allowed size (96k) please reduce your file size"; } } // Missing bracket here } ?>
  13. Two # signs and no closing > probably isn't helping. Try: $colour = "#FF0000"; // this is just to test whether the background colour changes $cal_event_opentd = "<td align=center bgcolor=<?php echo $colour;?>><b>";
  14. If you truly want to get into some more advanced "interactive" graphics, I recommend looking at Flash and not so much PHP. But get started with the GD library online and learn some of its limitations (I don't think you will need a full book to get an idea of the functions).
  15. Its very hard to follow what you are saying when you don't use punctuation, give us examples, or listen to what we are saying. I think if you took some time to really respond to what Thorpe has been asking you, you would get some positive results. Patience. We are here to help you if you just slow down and take your time with posting code and examples. If you have a new issue, we will deal with that, but lets do one at a time.
×
×
  • 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.