Shoutbox

Java or PHP.. or JScript - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Java or PHP.. or JScript (/showthread.php?tid=76428)

Java or PHP.. or JScript by LifelesS on 07-31-2007 at 11:27 AM

Don't know if it's the correct place to post asking this, but it's something I want to implement on a script I'm building so...(h)

Anyway, my question is, I want to be hable to make a bar/line chart, but I don't know if I should use Java or PHP.

Java, you just need to have Java Platform installed...
With PHP it needs to be on a server...

Also, can it be done with JScript + GDI or something? How?

TIA


RE: Java or PHP.. or JScript by Nathan on 07-31-2007 at 11:35 AM

You can make them in all of those programs, php or js being the most efficient (js the most efficient for the server)


RE: Java or PHP.. or JScript by LifelesS on 07-31-2007 at 11:39 AM

maybe I'll go for js, that way it's all done locally... but how do I do it? can someone give me an example or point me to an example?


RE: Java or PHP.. or JScript by Volv on 07-31-2007 at 12:32 PM

js wouldn't allow you to create a graph in an image form (ie. which can be right click > saved etc.), PHP would probably be the best way to go as it supports the GD library (you'll need to check with your web host though - or just try it and see if it works) and has perhaps some relatively simpler methods of creating such graphs depending on how you want it to look.

Most important is that you've planned how you're going to incorporate this PHP or JS into your script. If it's gonna be something done completely locally then JS is really the only way to go (if you want it to show in a browser), if the script user is going to have to visit a website then PHP is probably best. There are methods of doing this in a PlusWnd as well which would probably be most suitable for a script, but as I don't know what exactly you're trying to do it's a bit difficult to determine what's best for you.


RE: Java or PHP.. or JScript by LifelesS on 07-31-2007 at 12:45 PM

PHP allows you right click and save and my web host has PHP. I can do it locally with Java too, the user just needs to have Java Platform installed, I think basicly everyone has Java installed. Thinking that way, I could probably use Excel to build the graphic... but not all people have office installed, I think Java is more 'safe' that way.

Using PHP I could also make a database for each user that has the script so they could see diferent graphics from diferent months/weeks/days.
Or just to save it in the script file path instead of filling a database (since the host I'm on is free :\)


The script I'm trying to make basicly does some % statistics about the number of online contacts, etc etc, and I would like to use a bar/line chart for a more... 'eye catching' thing, I think it could be interesting.


RE: Java or PHP.. or JScript by Ezra on 07-31-2007 at 12:53 PM

quote:
Originally posted by LifelesS
The script I'm trying to make basicly does some % statistics about the number of online contacts, etc etc, and I would like to use a bar/line chart for a more... 'eye catching' thing, I think it could be interesting.

You don't need any webservices for that, i'm sure you can do that perfectly well with GDI+
RE: Java or PHP.. or JScript by Nathan on 07-31-2007 at 01:04 PM

However, the user has to have Javascript enabled, and if they don't it wont work at all.
In most case's I would choose PHP because like so many people have said that it can be saved by the user. Also with php you can save it onto the server.


RE: Java or PHP.. or JScript by matty on 07-31-2007 at 01:09 PM

2D Animated Charts - The Code Project - Fonts & GDI

Check the C++ Source code, they will show how to create a graph using Gdip, then all you need to do is save the image based on its handle using GdipSaveImage.


RE: Java or PHP.. or JScript by Ezra on 07-31-2007 at 01:30 PM

quote:
Originally posted by Napbree
However, the user has to have Javascript enabled, and if they don't it wont work at all.
In most case's I would choose PHP because like so many people have said that it can be saved by the user. Also with php you can save it onto the server.

But he's talking about msgplus scripts right? not browser Javascript?
RE: Java or PHP.. or JScript by Volv on 07-31-2007 at 01:34 PM

quote:
Originally posted by Ezra
But he's talking about msgplus scripts right? not browser Javascript?
Scripts use JScript, not Javascript.
RE: Java or PHP.. or JScript by Ezra on 07-31-2007 at 02:12 PM

quote:
Originally posted by Volv

Scripts use JScript, not Javascript.

Yes I know that, but it looks like Napbree thinks he's talking about a  javascript script that runs in your browser. And not about msgplus scripts.
RE: RE: Java or PHP.. or JScript by LifelesS on 07-31-2007 at 02:46 PM

Thanks for the replys

quote:
Originally posted by matty
2D Animated Charts - The Code Project - Fonts & GDI

Check the C++ Source code, they will show how to create a graph using Gdip, then all you need to do is save the image based on its handle using GdipSaveImage.


I'll give it a look, thanks:)
RE: RE: Java or PHP.. or JScript by Volv on 08-01-2007 at 08:36 AM

quote:
Originally posted by Ezra
quote:
Originally posted by Volv

Scripts use JScript, not Javascript.

Yes I know that, but it looks like Napbree thinks he's talking about a  javascript script that runs in your browser. And not about msgplus scripts.

But he is. At least that's what I've understood about the thread, since he's comparing PHP and Javascript (both strongly - if not entirely - related to browsers).
RE: RE: RE: Java or PHP.. or JScript by LifelesS on 08-01-2007 at 10:46 AM

quote:
Originally posted by Volv
quote:
Originally posted by Ezra
quote:
Originally posted by Volv

Scripts use JScript, not Javascript.

Yes I know that, but it looks like Napbree thinks he's talking about a  javascript script that runs in your browser. And not about msgplus scripts.

But he is. At least that's what I've understood about the thread, since he's comparing PHP and Javascript (both strongly - if not entirely - related to browsers).


He got it wrong...:) happens;)


I've got another question, and I think there's no need to open a new thread, so...

Does anyone knows if there's a ActiveXObject reference or something?
RE: Java or PHP.. or JScript by mag56pi3 on 08-01-2007 at 01:14 PM

I'm not completely sure about what exactly it is that youre looking for but have you thought of checking out a script directory to find something that may already exist to do what youre looking to accomplish?  I used to use scripts.com but recently got hooked on www.codango.com for web programming related stuff.


Anyway, I think you may find something somewhat relevant in the graphics area...theres some categories of image editors and stuff too, i'm not entirely sure what you want but if it exists you may find it here...

http://codango.com/php/dir/components/graphics/

From my understanding of what you want to do - PHP is probably the best bet as anyone visiting your site will be able to properly view the charts with no other little worries.  It stinks to have to buy some hosting space, but on the brightside PHP hosting is cheap and even better - your users should all view it problem free than :)

Good luck!


RE: RE: Java or PHP.. or JScript by LifelesS on 08-01-2007 at 01:22 PM

quote:
Originally posted by mag56pi3
I'm not completely sure about what exactly it is that youre looking for but have you thought of checking out a script directory to find something that may already exist to do what youre looking to accomplish?  I used to use scripts.com but recently got hooked on www.codango.com for web programming related stuff.


Anyway, I think you may find something somewhat relevant in the graphics area...theres some categories of image editors and stuff too, i'm not entirely sure what you want but if it exists you may find it here...

http://codango.com/php/dir/components/graphics/

From my understanding of what you want to do - PHP is probably the best bet as anyone visiting your site will be able to properly view the charts with no other little worries.  It stinks to have to buy some hosting space, but on the brightside PHP hosting is cheap and even better - your users should all view it problem free than :)

Good luck!



I have, that's why I'm asking, because I see people using I wanted use with ActiveXObject and I get myself thinking where they got it. So far I've been always lucky to find a script that has what I was looking...


I'm thinking a lot about using PHP on the script, even if I make the graphic in PHP then save it has an image and show on a window. And I also have the database feature...

Thanks :)

About the host, it doesn't worry me much.
RE: Java or PHP.. or JScript by vaccination on 08-01-2007 at 02:12 PM

If you're using a web browser to display the image, you could use VML I think.

I used it recently to create a pie chart from different MySQL queries whilst on work experience. I was using asp.net and vb.net as well as jscript  though. I'm not sure if it's what you want but thought I'd give my 2 cents =p


RE: Java or PHP.. or JScript by Ezra on 08-01-2007 at 02:21 PM

Isn't it better to use SVG then, instead of VML?

Or that funky script that patchou used for the personalized heat maps.


RE: RE: Java or PHP.. or JScript by LifelesS on 08-01-2007 at 06:31 PM

I'm thinking of following the example on the link that mag56pi3 posted.

quote:
Originally posted by Ezra
Or that funky script that patchou used for the personalized heat maps.


which script?
RE: Java or PHP.. or JScript by Ezra on 08-01-2007 at 11:43 PM

Lucky for you the 'temporary' heat map page still exists so...

See my attachment :)


RE: Java or PHP.. or JScript by LifelesS on 08-01-2007 at 11:50 PM

Many thanks :D

Now I'm still going to the headache of creating the XML files.....:banh: