Make it not display any text between <script> tags or your pages will be cluttered with stuff the user won't understand.
Offline
fullmoon wrote:
I would do the PHP if I had a place to host it!
I recommend t35 hosting if you need free hosting. I haven't used it in a while so I'm not sure on the current bandwidth allowed. If you don't mind the ads it's a great choice to use.
Offline
DistantVisit wrote:
fullmoon wrote:
I would do the PHP if I had a place to host it!
I recommend t35 hosting if you need free hosting. I haven't used it in a while so I'm not sure on the current bandwidth allowed. If you don't mind the ads it's a great choice to use.
![]()
Nah, want free hosting and no ads? Then use 000webhost

Offline
Shall I make source code available so others can help improve?
Offline
please and give us a guide!
Offline
Sorry, the project's sort of stuck as I've just got back to school and the homework's piling up. But I'm still working on it when I can.
Offline
PHP source (updated as I go): http://domc.eu5.org/jd1/source.txt.
If you have any suggestions or improvements for the code, post and I will update.
Offline
I know. I haven't finished it yet.
Offline
After a bit of experimenting a Panther custom block:
johnnydean1 wrote:
Name: 'PHP'
Type: 'r'
Code:
| contents p1 p2 p3 result URL mark length |
URL_ 'http://domc.eu5.org/jd1/?test=yes'. "The URL"
mark_ 'center'. "The part between the <>'s"
p2_ self concatenate: ('<') with: (mark).
result_ self concatenate: (mark) with: ('>').
contents_ self readFromUrl: (URL).
p1_ self indexOf: (result) startingAt: (0) in: (contents).
p2_ self concatenate: ('</') with: (mark).
result_ self concatenate: (mark) with: ('>').
p2_ self indexOf: (result) startingAt: (0) in: (contents).
p1_ p1 - 2.
contents_ self letters: (0) through: (p1) of: (contents).
length_ self stringLength: (contents).
p1_ 0.
p2_ 0.
p3_ 0.
result_ ''.
length timesRepeat: [
p1_ p1 + 1.
p2_ self letter: (p1) of: (contents).
p2 = '<'
ifTrue: [
p3_ 1.
]
ifFalse: [
p2= '>'
ifTrue: [
p3_ 2.
].
].
p3 = 0
ifTrue: [
result_ self concatenate: (result) with: (p2).
].
p3 = 2
ifTrue: [
p3_ 0.
].
].
contents_ result.
^ contents.
This removes all the HTML tags!
Last edited by johnnydean1 (2010-09-11 12:48:08)
Offline
Oh and this custom block, gets the guide:
Name: PHP Guide
Type: r
Code:
| contents p1 p2 p3 result URL length |
URL_ 'http://domc.eu5.org/jd1/guide.php'. "The URL"
contents_ self readFromUrl: (URL).
length_ self stringLength: (contents).
p1_ 0.
p2_ 0.
p3_ 0.
result_ ''.
length timesRepeat: [
p1_ p1 + 1.
p2_ self letter: (p1) of: (contents).
p2 = '<'
ifTrue: [
p3_ 1.
]
ifFalse: [
p2 = '{'
ifTrue: [
p3_1.
]
ifFalse: [
p2= '>'
ifTrue: [
p3_ 2.
].
p2 = '}'
ifTrue: [
p3_2.
].
].
].
p3 = 0
ifTrue: [
result_ self concatenate: (result) with: (p2).
].
p3 = 2
ifTrue: [
p3_ 0.
].
].
contents_ result.
^ contents.Offline
Sperry wrote:
DistantVisit wrote:
fullmoon wrote:
I would do the PHP if I had a place to host it!
I recommend t35 hosting if you need free hosting. I haven't used it in a while so I'm not sure on the current bandwidth allowed. If you don't mind the ads it's a great choice to use.
![]()
Nah, want free hosting and no ads? Then use 000webhost
Yes, 000webhost.com is probably the best place, but I warn you... You're site may be deleted, remember to back-up everything at least each day. At most.
Offline
Magnie wrote:
Sperry wrote:
DistantVisit wrote:
I recommend t35 hosting if you need free hosting. I haven't used it in a while so I'm not sure on the current bandwidth allowed. If you don't mind the ads it's a great choice to use.![]()
Nah, want free hosting and no ads? Then use 000webhost
Yes, 000webhost.com is probably the best place, but I warn you... You're site may be deleted, remember to back-up everything at least each day. At most.
Yes it may be deleted due to the fact it goes under moderation every so often. Just to check if your site is okay.

Offline
OK... I should be able to do a lot more Monday onwards because I'll have handed in a large piece of homework.
Offline
No mod, currently, can write to a webpage - the only way it's possible is if at the end of the game a webpage opens like this: www.url.com/index.php?score=122
that way php can write it to an SQL database or a .txt file on the server. That way you can see the top scores ect...
(and no you can't get a webpage to open every second sending info to a webpage, for an start it would be annoying and it takes a while to read a file anyway! So no opening this: www.url.com/index.php?x=45&y=76&game=2&player=6 That would never work!
Offline
Daffy just because you think things are not possible doesnt mean then allways are.
Offline