Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Javascript (https://www.askmehelpdesk.com/forumdisplay.php?f=452)
-   -   How can I randomise images in a site to be linked via html coding for another site? (https://www.askmehelpdesk.com/showthread.php?t=116370)

  • Aug 4, 2007, 03:22 AM
    sanjidas
    How can i randomise images in a site to be linked via html coding for another site?
    Hi,

    I am mesmerised. How do Flickr, mybloglog, Facebook and numerous other sites update their badges eberytime the information is updated? Someone told me it is done with js.
    I hava a wordpress.com blog, which means I am not allowed to use javascript there. So I have to link my images updated in another site only via html in order for them to show up in my blog.

    Also is it possible to randomise images in another site and link to it via html for my wordpress.com blog? So that, for example, I can have one image at morning and another at evening?

    Thanks in advance!
  • Aug 7, 2007, 07:17 AM
    retsoksirhc
    Quote:

    Originally Posted by sanjidas
    Hi,

    I am mesmerised. How do Flickr, mybloglog, facebook and numerous other sites update their badges eberytime the information is updated? Someone told me it is done with js.
    I hava a wordpress.com blog, which means i am not allowed to use javascript there. so i have to link my images updated in another site only via html in order for them to show up in my blog.

    Also is it possible to randomise images in another site and link to it via html for my wordpress.com blog? so that, for example, i can have one image at morning and another at evening?

    Thanks in advance!

    You mean like, where you have your picture posted somewhere, and it changes?
    For instance, on your forum signature, every time a page loads, it will show a different picture?

    I've heard of people doing it with PHP before, but I don't think I've seen it with Javascript. Basically how people do it with PHP is to set up PHP to handle the JPEG or other image formats, then use either filesystem functions to read the images in binary, and transfer them, with the correct Content-type headers, or they do it with the Image Library functions (I think its gdd), and the correct content-type headers.
  • Aug 8, 2007, 05:50 AM
    sanjidas
    That's bad news for me, if it isn't js at all.

    Is it the same story for Online Dictionary, Encyclopedia and Thesaurus. Free access.

    I mean, all you have to do is paste some html code from them and you have fresh content from them everyday on your blog. Is that also done without js?

    And also there's no way I can use js to control stuff in one site and make it appear as per the specifications in another site via html?

    Ah, that's bad news for me.

    Oops, I guess I said that already!

    Umm, is there any php-dedicated site that delivers free php codes to make stuff bahave that way?
  • Aug 10, 2007, 07:29 AM
    retsoksirhc
    Ah, I see what you mean now. That can be done with javascript, yes.

    To display different images at different times of they day, you could just the date functions from javascript. I don't work with it too often, so I don't remember specifically what they are, but you basically would just make it say something like

    If the time of day is between 6AM and 12PM, load THIS into the page
    Else, if the time of day is between 12PM and 8PM, load THIS into the page
    Else, load THIS into the page

    Sorry I can't be more specific than that.

  • All times are GMT -7. The time now is 01:21 PM.