Hulp met een ?id=test script
ik ben al 2 uur bezig ermee en ik kom er echt niet uit
het script:
Dit is dan in principe alles dat je in test.php neer hoeft te zetten...
en niet dat hij achter ?id= de text in me pagina zet maar de text die in de test.php staat
Gewijzigd op 01/01/1970 01:00:00 door Angelo Kreikamp
Code (php)
ps. Dit is allemaal vrij basale PHP kennis, dus neem eens een kijkje in deze PHP beginnershandleiding. Daarin wordt e.e.a je waarschijnlijk een stuk duidelijker.
Gewijzigd op 01/01/1970 01:00:00 door Joren de Wit
niet met isset en $_get
bedankt weer wat geleerd !
dankje
Edit:
nu heb ik dus een nieuw probleem ik wil er een hoop data inzetten net als dit
http://www.habbohotel.co.uk/gamedata/external?id=external_texts
http://www.habbohotel.co.uk/gamedata/external?id=external_variables
zoals hun hebben gedaan met hun external.php file
die reageert op die 1 maar zet ik al die inhoud van die dingen tussen echo is de code gemolt?
Gewijzigd op 01/01/1970 01:00:00 door Angelo Kreikamp
Uiteraard zou je de content ook in een extern bestand kunnen zetten en die vervolgens met bijvoorbeeld file_get_contents() uit kunnen lezen. Dan heb je geen last van eventuele quotes.
op die links
Laat eens zien hoe je het nu dan in een echo zet?
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<?php
if(isset($_GET['id']))
{
if($_GET['id'] == 'external_variables')
{
echo 'cast.entry.39=hh_human_50_acc_face
client.use.invites=1
external.figurepartlist.txt=http://www.habbohotel.co.uk/gamedata/figuredata
cast.entry.33=hh_human_acc_face
cast.entry.11=hh_human_hair
link.format.userpage=http://%predefined%//rd/%ID%
room.rating.enable=1
interface.cmds.active.ctrl=["move","rotate"]
cast.entry.28=hh_recycler
client.textdata.utf8=1
cast.entry.14=hh_human_shoe
friend_request_declined=Declined!
cast.entry.16=hh_pets_common
cast.entry.6=hh_human
link.format.collectibles=http://%predefined%/credits/collectibles
navigator.visible.public.root=3
figure.draworder.xml.secure=https://www.habbo.co.uk/gamedata/figurepartconfig/draworder
room.cast.11=hh_badges
interstitial.max.displays=5
room.cast.1=hh_soundmachine
interface.cmds.item.ctrl=[]
cast.entry.40=hh_human_50_acc_head
fuse.project.id=habbo_uk
cast.entry.32=hh_human_acc_eye
dynamic.download.url=http://images.habbohotel.co.uk/dcr/hof_furni/
cast.entry.34=hh_human_acc_head
interface.cmds.user.owner=["take_rights","give_rights","kick","friend","trade","ignore","unignore","userpage"]
navigator.visible.private.root=4
struct.font.italic=[#font:"v", #fontSize:9,#lineHeight:10,#color:rgb("#000000"),#ilk:#struct,#fontStyle:[#italic]]
cast.entry.15=hh_kiosk_room
navigator.default.view=public
security.cast.load.url=http://www.habbohotel.co.uk/gamedata/sec.cct?t=%token%
room.recommendations=1
room.cast.10=hh_roomdimmer
link.format.friendlist.pref=http://%predefined%/profile/friendsmanagement?tab=6
stats.tracking.javascript=google
friend_request_failed=Failed!
cast.entry.41=hh_human_50_body
cast.entry.10=hh_human_hats
room.cast.5=hh_human_50_leg
cast.entry.30=hh_tutorial
cast.entry.4=hh_interface
cast.entry.31=hh_entry_init
interface.cmds.user.ctrl=["kick","friend","trade","ignore","unignore","userpage"]
cast.entry.19=hh_furni_classes
interface.cmds.photo.owner=["pick","delete"]
cast.entry.21=hh_club
displayer.tag.expiration.time=600000
furnidata.load.url=http://www.habbohotel.co.uk/gamedata/furnidata?hash=%hash%
swimjump.key.list=[#run1:"A", #run2:"D", #dive1:"W", #dive2:"E", #dive3:"A", #dive4:"S", #dive5:"D", #dive6:"Z", #dive7:"X", #jump:"SPACE"]
cast.entry.17=hh_room_utils
dynamic.download.name.template=%revision%/hh_furni_xx_%typeid%.cct
cast.entry.44=hh_ig
games.tickets.hide=0
navigator.cache.duration=30
struct.font.tooltip=[#font:"v", #fontSize:9,#lineHeight:10,#color:rgb("#000000"),#ilk:#struct,#fontStyle:[#plain]]
cast.entry.35=hh_human_50_face
cast.entry.45=hh_ig_interface
stats.tracking.javascript.template=/\TCODE
cast.entry.20=hh_room
room.cast.4=hh_human_50_shirt
room.cast.3=hh_human_acc_waist
interface.cmds.photo.ctrl=[]
figure.animation.xml=http://www.habbohotel.co.uk/gamedata/figurepartconfig/animation
cast.entry.18=hh_room_ui
private.image.library.url=http://images-webtool.varoke.net/c_images/
cast.entry.47=hh_guide
club.subscription.disabled=1
cast.entry.12=hh_human_shirt
interface.cmds.user.friend=["friend","trade","ignore","unignore","userpage"]
struct.font.plain=[#font:"v", #fontSize:9,#lineHeight:10,#color:rgb("#000000"),#ilk:#struct,#fontStyle:[#plain]]
room.cast.2=hh_human_acc_chest
cast.entry.24=hh_cat_code
link.format.mailpage=http://%predefined%/me#mail/compose/%recipientid%
friend_request_massoperation_cancel=Back to request list.
dynamic.download.samples.template=%revision%/%typeid%.cct
text.render.compatibility.mode=2
interface.cmds.active.owner=["move","rotate","pick"]
cast.entry.43=hh_instant_messenger
purse.transactions.active=1
friend_request_accepted=Accepted!
cast.entry.1=hh_entry_uk
room.default.floor=111
hh.cast.11=hh_badges
cast.entry.7=hh_human_body
cast.entry.13=hh_human_leg
client.full.refresh.period=5000
struct.font.link=[#font:"v", #fontSize:9,#lineHeight:10,#color:rgb("#000000"),#ilk:#struct,#fontStyle:[#underline]]
friend_request_accept_all=Accept all requests.
console_request_massoperation_title=You have %messageCount% friend requests waiting.
friend_request_decline_all=Decline all requests.
cast.entry.42=hh_friend_list
char.conversion.mac=[128:219,130:226,131:196,132:227,133:201,134:160,135:224,136:246,137:228,139:220,140:206,145:212,146:213,147:210,148:211,149:165,150:208,151:209,152:247,153:170,155:221,156:207,159:217,161:193,165:180,167:164,168:172,170:187,171:199,172:194,173:208,174:168,176:161,180:171,182:166,183:225,184:252,186:188,187:200,191:192,192:203,193:231,194:229,195:204,196:128,197:129,198:174,199:130,200:233,201:131,202:230,203:232,204:237,205:234,206:235,207:236,209:132,210:241,211:238,212:239,213:205,214:133,216:175,217:244,218:242,219:243,220:134,223:167,224:136,225:135,226:137,227:139,228:138,229:140,230:190,231:141,232:143,233:142,234:144,235:145,236:147,237:146,238:148,239:149,241:150,242:152,243:151,244:153,246:154,247:214,248:191,249:157,250:156,251:158,252:159,255:216]
cast.entry.2=hh_entry_base
console_request_massoperation_instruction=Use the options below to accept or decline ALL friend requests you have waiting.
text.crap.fixing=1
room.cast.9=hh_human_50_acc_waist
cast.entry.26=hh_buffer
language=en
client.version.id=401
cast.entry.27=hh_dynamic_downloader
figure.draworder.xml=http://www.habbohotel.co.uk/gamedata/figurepartconfig/draworder
moderator.cmds=[":alert x",":ban x",":kick x",":superban x",":shutup x",":unmute x",":transfer x",":softkick x"]
rosetta.warning.page.url=http://%predefined%/client_popup/rosetta_info
friend_request_options=Advanced options.
link.format.mail.inbox=http://%predefined%/me#mail
link.format.user.search=http://%predefined%/me#habbo-search
room.cast.6=hh_human_50_shoe
productdata.load.url=http://www.habbohotel.co.uk/gamedata/productdata?hash=%hash%
room.cast.8=hh_human_50_acc_chest
cast.entry.36=hh_human_50_hats
cast.entry.22=hh_photo
room.default.wall=201
cast.entry.23=hh_navigator
castload.retry.delay=20000
link.format.mail.compose=http://%predefined%/me#mail/compose/%recipientid%/%random%/
client.window.title=Habbo Hotel
navigator.private.default=4
interface.cmds.item.owner=["pick"]
interface.cmds.user.personal=["badge","dance","wave","hcdance","userpage"]
navigator.public.default=3
paalu.key.list=[#bal1:"Q", #bal2:"E", #push1:"A", #push2:"D", #move1:"N", #move2:"M", #stabilise:"SPACE"]
link.format.tag.search=http://%predefined%//tag/search?tag=%tag%
room.cast.small.1=hh_pets_50
cast.entry.25=hh_cat_gfx_all
cast.entry.5=hh_patch_uk
cast.entry.9=hh_human_item
figure.partsets.xml=http://www.habbohotel.co.uk/gamedata/figurepartconfig/partsets
tutorial.name.new_user_flow=NUF_mini
external.figurepartlist.txt.secure=https://www.habbo.co.uk/gamedata/figuredata
image.library.url=http://images.habbohotel.co.uk/c_images/
cast.entry.37=hh_human_50_hair
cast.entry.38=hh_human_50_acc_eye
cast.entry.8=hh_human_face
room.cast.private=["hh_room_private", "hh_room_landscapes"]
struct.font.bold=[#font:"vb",#fontSize:9,#lineHeight:10,#color:rgb("#000000"),#ilk:#struct,#fontStyle:[#plain]]
cast.entry.46=hh_pets
struct.font.grey=[#font:"v", #fontSize:9,#lineHeight:10,#color:rgb("#666666"),#ilk:#struct,#fontStyle:[#italic]]
console_select_requests=Following users have asked to be your friend. Please accept or decline.
permitted.name.chars=1234567890qwertyuiopasdfghjklzxcvbnm-=?!@:.,
client.flood.timeout=300000
cast.entry.29=hh_poll
room.cast.7=hh_human_50_item
cast.entry.3=hh_shared';
}
elseif($_GET['id'] == 'external_texts')
{
echo 'test2';
}
}
?>
if(isset($_GET['id']))
{
if($_GET['id'] == 'external_variables')
{
echo 'cast.entry.39=hh_human_50_acc_face
client.use.invites=1
external.figurepartlist.txt=http://www.habbohotel.co.uk/gamedata/figuredata
cast.entry.33=hh_human_acc_face
cast.entry.11=hh_human_hair
link.format.userpage=http://%predefined%//rd/%ID%
room.rating.enable=1
interface.cmds.active.ctrl=["move","rotate"]
cast.entry.28=hh_recycler
client.textdata.utf8=1
cast.entry.14=hh_human_shoe
friend_request_declined=Declined!
cast.entry.16=hh_pets_common
cast.entry.6=hh_human
link.format.collectibles=http://%predefined%/credits/collectibles
navigator.visible.public.root=3
figure.draworder.xml.secure=https://www.habbo.co.uk/gamedata/figurepartconfig/draworder
room.cast.11=hh_badges
interstitial.max.displays=5
room.cast.1=hh_soundmachine
interface.cmds.item.ctrl=[]
cast.entry.40=hh_human_50_acc_head
fuse.project.id=habbo_uk
cast.entry.32=hh_human_acc_eye
dynamic.download.url=http://images.habbohotel.co.uk/dcr/hof_furni/
cast.entry.34=hh_human_acc_head
interface.cmds.user.owner=["take_rights","give_rights","kick","friend","trade","ignore","unignore","userpage"]
navigator.visible.private.root=4
struct.font.italic=[#font:"v", #fontSize:9,#lineHeight:10,#color:rgb("#000000"),#ilk:#struct,#fontStyle:[#italic]]
cast.entry.15=hh_kiosk_room
navigator.default.view=public
security.cast.load.url=http://www.habbohotel.co.uk/gamedata/sec.cct?t=%token%
room.recommendations=1
room.cast.10=hh_roomdimmer
link.format.friendlist.pref=http://%predefined%/profile/friendsmanagement?tab=6
stats.tracking.javascript=google
friend_request_failed=Failed!
cast.entry.41=hh_human_50_body
cast.entry.10=hh_human_hats
room.cast.5=hh_human_50_leg
cast.entry.30=hh_tutorial
cast.entry.4=hh_interface
cast.entry.31=hh_entry_init
interface.cmds.user.ctrl=["kick","friend","trade","ignore","unignore","userpage"]
cast.entry.19=hh_furni_classes
interface.cmds.photo.owner=["pick","delete"]
cast.entry.21=hh_club
displayer.tag.expiration.time=600000
furnidata.load.url=http://www.habbohotel.co.uk/gamedata/furnidata?hash=%hash%
swimjump.key.list=[#run1:"A", #run2:"D", #dive1:"W", #dive2:"E", #dive3:"A", #dive4:"S", #dive5:"D", #dive6:"Z", #dive7:"X", #jump:"SPACE"]
cast.entry.17=hh_room_utils
dynamic.download.name.template=%revision%/hh_furni_xx_%typeid%.cct
cast.entry.44=hh_ig
games.tickets.hide=0
navigator.cache.duration=30
struct.font.tooltip=[#font:"v", #fontSize:9,#lineHeight:10,#color:rgb("#000000"),#ilk:#struct,#fontStyle:[#plain]]
cast.entry.35=hh_human_50_face
cast.entry.45=hh_ig_interface
stats.tracking.javascript.template=/\TCODE
cast.entry.20=hh_room
room.cast.4=hh_human_50_shirt
room.cast.3=hh_human_acc_waist
interface.cmds.photo.ctrl=[]
figure.animation.xml=http://www.habbohotel.co.uk/gamedata/figurepartconfig/animation
cast.entry.18=hh_room_ui
private.image.library.url=http://images-webtool.varoke.net/c_images/
cast.entry.47=hh_guide
club.subscription.disabled=1
cast.entry.12=hh_human_shirt
interface.cmds.user.friend=["friend","trade","ignore","unignore","userpage"]
struct.font.plain=[#font:"v", #fontSize:9,#lineHeight:10,#color:rgb("#000000"),#ilk:#struct,#fontStyle:[#plain]]
room.cast.2=hh_human_acc_chest
cast.entry.24=hh_cat_code
link.format.mailpage=http://%predefined%/me#mail/compose/%recipientid%
friend_request_massoperation_cancel=Back to request list.
dynamic.download.samples.template=%revision%/%typeid%.cct
text.render.compatibility.mode=2
interface.cmds.active.owner=["move","rotate","pick"]
cast.entry.43=hh_instant_messenger
purse.transactions.active=1
friend_request_accepted=Accepted!
cast.entry.1=hh_entry_uk
room.default.floor=111
hh.cast.11=hh_badges
cast.entry.7=hh_human_body
cast.entry.13=hh_human_leg
client.full.refresh.period=5000
struct.font.link=[#font:"v", #fontSize:9,#lineHeight:10,#color:rgb("#000000"),#ilk:#struct,#fontStyle:[#underline]]
friend_request_accept_all=Accept all requests.
console_request_massoperation_title=You have %messageCount% friend requests waiting.
friend_request_decline_all=Decline all requests.
cast.entry.42=hh_friend_list
char.conversion.mac=[128:219,130:226,131:196,132:227,133:201,134:160,135:224,136:246,137:228,139:220,140:206,145:212,146:213,147:210,148:211,149:165,150:208,151:209,152:247,153:170,155:221,156:207,159:217,161:193,165:180,167:164,168:172,170:187,171:199,172:194,173:208,174:168,176:161,180:171,182:166,183:225,184:252,186:188,187:200,191:192,192:203,193:231,194:229,195:204,196:128,197:129,198:174,199:130,200:233,201:131,202:230,203:232,204:237,205:234,206:235,207:236,209:132,210:241,211:238,212:239,213:205,214:133,216:175,217:244,218:242,219:243,220:134,223:167,224:136,225:135,226:137,227:139,228:138,229:140,230:190,231:141,232:143,233:142,234:144,235:145,236:147,237:146,238:148,239:149,241:150,242:152,243:151,244:153,246:154,247:214,248:191,249:157,250:156,251:158,252:159,255:216]
cast.entry.2=hh_entry_base
console_request_massoperation_instruction=Use the options below to accept or decline ALL friend requests you have waiting.
text.crap.fixing=1
room.cast.9=hh_human_50_acc_waist
cast.entry.26=hh_buffer
language=en
client.version.id=401
cast.entry.27=hh_dynamic_downloader
figure.draworder.xml=http://www.habbohotel.co.uk/gamedata/figurepartconfig/draworder
moderator.cmds=[":alert x",":ban x",":kick x",":superban x",":shutup x",":unmute x",":transfer x",":softkick x"]
rosetta.warning.page.url=http://%predefined%/client_popup/rosetta_info
friend_request_options=Advanced options.
link.format.mail.inbox=http://%predefined%/me#mail
link.format.user.search=http://%predefined%/me#habbo-search
room.cast.6=hh_human_50_shoe
productdata.load.url=http://www.habbohotel.co.uk/gamedata/productdata?hash=%hash%
room.cast.8=hh_human_50_acc_chest
cast.entry.36=hh_human_50_hats
cast.entry.22=hh_photo
room.default.wall=201
cast.entry.23=hh_navigator
castload.retry.delay=20000
link.format.mail.compose=http://%predefined%/me#mail/compose/%recipientid%/%random%/
client.window.title=Habbo Hotel
navigator.private.default=4
interface.cmds.item.owner=["pick"]
interface.cmds.user.personal=["badge","dance","wave","hcdance","userpage"]
navigator.public.default=3
paalu.key.list=[#bal1:"Q", #bal2:"E", #push1:"A", #push2:"D", #move1:"N", #move2:"M", #stabilise:"SPACE"]
link.format.tag.search=http://%predefined%//tag/search?tag=%tag%
room.cast.small.1=hh_pets_50
cast.entry.25=hh_cat_gfx_all
cast.entry.5=hh_patch_uk
cast.entry.9=hh_human_item
figure.partsets.xml=http://www.habbohotel.co.uk/gamedata/figurepartconfig/partsets
tutorial.name.new_user_flow=NUF_mini
external.figurepartlist.txt.secure=https://www.habbo.co.uk/gamedata/figuredata
image.library.url=http://images.habbohotel.co.uk/c_images/
cast.entry.37=hh_human_50_hair
cast.entry.38=hh_human_50_acc_eye
cast.entry.8=hh_human_face
room.cast.private=["hh_room_private", "hh_room_landscapes"]
struct.font.bold=[#font:"vb",#fontSize:9,#lineHeight:10,#color:rgb("#000000"),#ilk:#struct,#fontStyle:[#plain]]
cast.entry.46=hh_pets
struct.font.grey=[#font:"v", #fontSize:9,#lineHeight:10,#color:rgb("#666666"),#ilk:#struct,#fontStyle:[#italic]]
console_select_requests=Following users have asked to be your friend. Please accept or decline.
permitted.name.chars=1234567890qwertyuiopasdfghjklzxcvbnm-=?!@:.,
client.flood.timeout=300000
cast.entry.29=hh_poll
room.cast.7=hh_human_50_item
cast.entry.3=hh_shared';
}
elseif($_GET['id'] == 'external_texts')
{
echo 'test2';
}
}
?>
zoals je ziet laat hij de codes niet zien zoals ze dat hier doen op
http://www.habbohotel.co.uk/gamedata/external?id=external_variables
en zo wil ik het graag zonder een externe file te hebben hun doen dat namelijk ook niet
ps. Of het de slimste manier is om deze tekst zo in een echo te zetten is natuurlijk een tweede. Mocht er nu iets in veranderen, zul jij altijd de broncode in moeten duiken om de code aan te passen.
Gewijzigd op 01/01/1970 01:00:00 door Joren de Wit
http://www.habbohotel.co.uk/gamedata/external?id=external_variables
en dan met dit script van test.php?id=external_variables
dan zie je dat van habbohotel alles netjes onder mekaar staat en die van test.php allemaal achter elkaar
ps. Zo zou je het kunnen oplossen:
Maar dan zul je dus in je PHP file ook alles op een nieuwe regel moeten zetten, precies zoals je nu hebt...
Gewijzigd op 01/01/1970 01:00:00 door Joren de Wit
Conclusie: Lees de handleiding, gebruik file_get_contents om het up2date te houden, en zorg ervoor dat je alleen echo't wat je nodig hebt. Nogmaals, lees de handleiding even door ;) (En kijk trouwens ook even in de bibliotheek hier, staan een paar werkende tussen alle ouwe meuk ;))
en er mag niks aan de code tussen de (' ') van test2 verandert worden want dan werkt het programa niet wat instelling laat ik krijg dus nu errors zet de inhoud van http://www.habbohotel.co.uk/gamedata/external?id=external_texts
maar eens tussen echo nl2br ('hier dus tussen') en dan zie je dat hij het niet goed doet :S
Gewijzigd op 01/01/1970 01:00:00 door Angelo Kreikamp
Post alleen relevante code. Je sluit je nl2br niet af, je escaped je text niet.
ps. Je probleem ontstaat doordat er ook quotes in de betreffende tekst zitten, dan wordt de string dus te vroeg afgesloten. Maar nogmaals, dit is absoluut geen handige manier om dit aan te pakken...
Waarom zet je de tekst niet gewoon in een txt file en lees je die in met PHP? Waarom wil je het zo graag in een onoverzichtelijke PHP echo hebben?
Gewijzigd op 01/01/1970 01:00:00 door Joren de Wit
ok dat werkte voor external_varibles maar vraag nu eens op test.php?id=test2
en er mag niks aan de code tussen de (' ') van test2 verandert worden want dan werkt het programa niet wat instelling laat ik krijg dus nu errors zet de inhoud van http://www.habbohotel.co.uk/gamedata/external?id=external_texts
maar eens tussen echo nl2br ('hier dus tussen') en dan zie je dat hij het niet doet
Zal vast wel ergens een ' in je text staan. Nogmaals, lees de beginnershandleiding hoe je moet escapen ;) En hoe je file_get_contents gebruikt.
En het is ook niet nodig om je eigen posts letterlijk te herhalen. Zie de edit van mijn vorige post...