mmmmmokey, i can do that fairly easily. I'm just wondering what it should return. Just the lfs://join=blahhere link as plain text?
What if someone is not online? Should it just return 'not online' or nothing at all?
In what context will that be used? I guess knowing that it'll make more sense to me, but atm i can't think of a useful scenario for this, so please enlighten me
PS, why not have it output just the hostname so you can create the link yourself? I mean, then it might be used in other scenarios as well, other than only providing an lfs: link.
Basically it's a friends gadget, its a fair way off from being finished...
A picture speaks a thousand words
Basically it's a friends gadget, its a fair way off from being finished... but this is the basic working concept which is a Windows Desktop Gadget.
I was thinking of somehow returning that url with either a link or no link, that way... if someone was online there would be a link over the Online/Spectating or In The Pits status, and when they are offline it just wouldn't work at all... (over the image) - possibly double-click so that you can't click it accidently
Hope you like my concept so far, btw
thats... a good idea :XD: don't know why I didn't think of that, although... you are Victor...
that would be better, actually
I have dealed with it in another way, though. It very depends on the isonline image. When the image has got 1392 bytes, it means it's offline image. However, I don't know what would happen if you changed the images
Hey, could I possibly have the coding for your "{$uname}" function? I'm very new to javascript
also, how did you send the "http://www.lfsworld.net/isonline.{$uname}" out to an image file? (that coding would be cool too... :shy
P.S. Thanks Victor, this opens up a whole range of things for lfs... can't think of any right now xD, but this ability should bring out some cool stuff
I can understand javascript and how it works, I just can't put it together... if you know what I mean... how would I input the http://www.lfsworld.net/athost.USERNAME add the "lfs://join=" and "hostname" together (= "lfs://join=hostname") then send it to a <a href="-----"></a> ?
function unameimg(k) { if (document.images) eval('document.img'+k+'.src=uname_img'+k+'.src'); }
function unameurl(k) { if (document.URL) eval('document.URL'+k+'.src=uname_url'+k+'.src'); }
That's not JavaScript but PHP... He just coded a function, so when you write isOnline('Flame CZE');, it opens the first 29 bytes of the image and then something I don't understand and retruns the number.
This can be done with PHP, too. You can use the file_get_contents() function to get the file contents to a string.
Awesome! Thanks man
I don't need the name of the server they are at ... although, not that I think about it... it would be handy to have... maybe hovering over the shows the current server they are at...
The first 28 bytes are the GIF header, which is identical for all 4 images, but luckily the first byte of the actual image data is different. What it does is convert the literal to its numeric value and switch that to the appropriate status code.
Everything can be parsed through PHP, the file extension doesn't matter. What does matter is whether your server software supports it and if you have the necessary permissions to adjust the corresponding settings.
Where are you hosting the page? If you don't host it on your own machine, ask the company that hosts it. Depending on whether PHP is installed as CGI bin or apache module, a simple .htaccess could do the job.
Try
AddType application/x-httpd-php .html
in a file named .htaccess in the same location the .html is in.
wouldn't it be better to just rename the file to .php instead? it would put less overhead on the web server if it doesn't have to check each .html file for php code.
What I was thinking was in fact more on Scawen's turf. Within LFS, it would accept the command follow with the value of Username. So for example the lfs join link would look like this. [url]lfs://follow=Dygear[/url]. Then once the game is loaded LFS would check to see if the user is still connected to the server and if they are not tell them that the user is no longer online and weather or no they would still like to join the server they where last in, and it also allows you to build a link like this.
I'm pretty sure it uses the ord function to return the value (in an integer form) of the first unique value (past the header of the image) for each of the images.
Beat me to it.
<?php </?>. <-- That's your problem. It should be <?php ?> or <? ?>.
Choose the one which suits the machine you're running it on? You're asking us for X when we don't even know Y. Although, if you have to ask whether you have PHP running on your machine then you probably don't.
If you're running on Windows don't get involved in the Dreamweaver pish, just open up the php files in your localhost or on a web server.
Well, that really depends. Can Windows Gadgets run PHP? Can you setup a local apache / php / mysql install and use the apache parser inplace of the windows gadget function?