Polymorphic Entries Galore!

Jul 08, 2005 01:30

Ever wanted your LiveJournal entries to update themselves? Well, if you have a server of your own, you can play around with this code! Otherwise, drool over this entry in my journal. If enough people are interested in this sort of silly thing, I might be interested in setting up a customizable service for anyone ( Read more... )

Leave a comment

jillykillroy July 8 2005, 17:24:01 UTC
I think this is pretty neat, but I really don't know enough about coding to implement it.

Then, I threw a hidden image into a post whose src attribute referred it back to this PHP script.

can you explain that further?

Reply

I'll take this one... greatbiggary July 8 2005, 17:38:59 UTC
Normally you put a url to an online image as the src (source) of your img tag, and the browser fetches the image and displays it on the page where and how you say. By instead putting in the url of a script on his server, the browser's attempt to call the image actually calls his script, which means any time someone looks at the page with the img tag pointing to his script, the script is fired off, and can gather things like who's asking for it, which I believe is how he's getting the referrer url with which to update the post. Spammers use this technique, too, in html email to get a pingback every time someone views their email - the email attempts to load the image which fires up a script. Their src paths include a unique ID so the script knows which email address is doing the looking. example: img src=someserver/somescript.pl?id=1209fj38hf280109f012h8g3 (or something like that - been awhile since I played in online scripting ( ... )

Reply

Re: I'll take this one... jillykillroy July 8 2005, 17:53:10 UTC
wow, awesome, thank you SO much. I got it to work even.

ok, if you have another minute, could you tell me how to get it to actually display an image?

Reply

Re: I'll take this one... disjointedmemes July 8 2005, 18:02:57 UTC
You could always have the PHP script spit out an image after it's done doing whatever it does.

Reply

Re: I'll take this one... jillykillroy July 8 2005, 18:50:51 UTC
all right - another question.

how can i get it to not update the entry if *i* access it? i don't want people to know how vain i am. i have the basic idea down, but i can't get the syntax right.

Reply

Re: I'll take this one... greatbiggary July 9 2005, 01:08:08 UTC
Oh c'mon. Just share the vanity. You know we all do it :)

-unhelpful

Reply


Leave a comment

Up