Kleine Vragen Topic #1

Gestart doorLennard4.284 reacties15.585 weergaven

4.285 berichten · pagina 282 van 286

Berichten
4.214
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nielsie schreef:
Eerdere citaten tonen
Timkb schreef:
Eerdere citaten tonen
Nielsie schreef:
Nee.
En waarom niet? Je kan via cURL met de webadmin van je router verbinden en alles prima uitlezen.
Nou dan heb jij wel een goeie router emo
Met bijna elke router kun je het admin panel bereikbaar maken met je ip. Nog nooit een router gehad waarbij dat niet mogelijk was.
0
Berichten
473
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bartw schreef:
Waarom krijg ik met PHP een 500 Internal server error terwijl ik m met mn browser gewoon kan openen? Al geprobeerd mn eigen user agent toe te voegen, maar het werkt niet. Link: http://infowebcan.piuscanisius.nl/Canisius/Actuelerooster/infoweb/selectie.inc.php?wat=groep&weeknummer=14&groep=2V1&type=0&sid=0.068845

Edit: Huh, nu kan ik t zelf opeens ook niet meer openen?
Edit: En nu weer wel?
Voor de mensen die het willen weten, voor als je er zelf een keer tegen aan loopt, er moest een cookie/sessie zijn, dus na dat toe te voegen in cURL werkte het!
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Voor een klein scriptje gebruik ik nu even geen framework maar als je MySQLi gebruikt en dan de prepare functie. Hoef je dan de vars niet meer te escapen, want op sommgie sites lees ik van dat het niet meer hoeft. Maar is dat echt zo?
0
Berichten
4.214
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Shahiem schreef:
Voor een klein scriptje gebruik ik nu even geen framework maar als je MySQLi gebruikt en dan de prepare functie. Hoef je dan de vars niet meer te escapen, want op sommgie sites lees ik van dat het niet meer hoeft. Maar is dat echt zo?
Ja, dan ben je zo goed als veilig.
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Timkb schreef:
Eerdere citaten tonen
Shahiem schreef:
Voor een klein scriptje gebruik ik nu even geen framework maar als je MySQLi gebruikt en dan de prepare functie. Hoef je dan de vars niet meer te escapen, want op sommgie sites lees ik van dat het niet meer hoeft. Maar is dat echt zo?
Ja, dan ben je zo goed als veilig.
Oke, thank you smile
0
Berichten
1.684
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Shahiem schreef:
Eerdere citaten tonen
Timkb schreef:
Eerdere citaten tonen
Shahiem schreef:
Voor een klein scriptje gebruik ik nu even geen framework maar als je MySQLi gebruikt en dan de prepare functie. Hoef je dan de vars niet meer te escapen, want op sommgie sites lees ik van dat het niet meer hoeft. Maar is dat echt zo?
Ja, dan ben je zo goed als veilig.
Oke, thank you smile
Vertrouw je zomaar op één persoon om te weten of het juist is of niet? emo
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maartenf schreef:
Eerdere citaten tonen
Shahiem schreef:
Eerdere citaten tonen
Timkb schreef:
Eerdere citaten tonen
Shahiem schreef:
Voor een klein scriptje gebruik ik nu even geen framework maar als je MySQLi gebruikt en dan de prepare functie. Hoef je dan de vars niet meer te escapen, want op sommgie sites lees ik van dat het niet meer hoeft. Maar is dat echt zo?
Ja, dan ben je zo goed als veilig.
Oke, thank you smile
Vertrouw je zomaar op één persoon om te weten of het juist is of niet? emo
Dus ik mag toch beleefd zijn en bedankt zeggen?
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Shahiem schreef:
Voor een klein scriptje gebruik ik nu even geen framework maar als je MySQLi gebruikt en dan de prepare functie. Hoef je dan de vars niet meer te escapen, want op sommgie sites lees ik van dat het niet meer hoeft. Maar is dat echt zo?
http://php.net/manual/en/pdo.prepared-statements.php

Quote:
Example #3 Fetching data using prepared statements
This example fetches data based on a key value supplied by a form. The user input is automatically quoted, so there is no risk of a SQL injection attack.

[COLOR= #0000BB]<?php
$stmt[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$dbh[/COLOR][COLOR= #007700]->[/COLOR]prepare[COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM REGISTRY where name = ?"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$stmt[/COLOR][COLOR= #007700]->[/COLOR]execute[COLOR= #007700]([/COLOR][URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]]))) {[/COLOR]
  [URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$stmt[/COLOR][COLOR= #007700]->[/COLOR]fetch[COLOR= #007700]()) {[/COLOR]
    [URL="http://www.php.net/print_r"]print_r[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700]);
  }
}[/COLOR]
?>


http://stackoverflow.com/questions/732561/why-is-using-a-mysql-prepared-statement-more-secure-than-using-the-common-escape

Quote:
An important point that I think people here are missing is that with a database that supports parameterized queries, there is no escaping to worry about. The database engine doesnt combine the bound variables into the SQL statement and then parse the whole thing; The bound variables are kept separate and never parsed as a generic SQL statement.

Thats where the security and speed comes from. The database engine knows the placeholder contains data only, so it is never parsed as a full SQL statement. The speedup comes when you prepare a statement once and then execute it many times; the canonical example being inserting multiple records into the same table. In this case, the database engine needs to parse, optimize, etc. only once.

Now, one gotcha is with database abstraction libraries. They sometimes fake it by just inserting the bound variables into the SQL statement with the proper escaping. Still, that is better than doing it yourself.
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Rik schreef:
Eerdere citaten tonen
Shahiem schreef:
Voor een klein scriptje gebruik ik nu even geen framework maar als je MySQLi gebruikt en dan de prepare functie. Hoef je dan de vars niet meer te escapen, want op sommgie sites lees ik van dat het niet meer hoeft. Maar is dat echt zo?
http://php.net/manual/en/pdo.prepared-statements.php

Quote:
Example #3 Fetching data using prepared statements
This example fetches data based on a key value supplied by a form. The user input is automatically quoted, so there is no risk of a SQL injection attack.

[COLOR= #0000BB]<?php
$stmt[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$dbh[/COLOR][COLOR= #007700]->[/COLOR]prepare[COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM REGISTRY where name = ?"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$stmt[/COLOR][COLOR= #007700]->[/COLOR]execute[COLOR= #007700]([/COLOR][URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]name[/COLOR][COLOR= #007700]]))) {[/COLOR]
  [URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$stmt[/COLOR][COLOR= #007700]->[/COLOR]fetch[COLOR= #007700]()) {[/COLOR]
    [URL="http://www.php.net/print_r"]print_r[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR][COLOR= #007700]);
  }
}[/COLOR]
?>

http://stackoverflow.com/questions/732561/why-is-using-a-mysql-prepared-statement-more-secure-than-using-the-common-escape

Quote:
An important point that I think people here are missing is that with a database that supports parameterized queries, there is no escaping to worry about. The database engine doesnt combine the bound variables into the SQL statement and then parse the whole thing; The bound variables are kept separate and never parsed as a generic SQL statement.

Thats where the security and speed comes from. The database engine knows the placeholder contains data only, so it is never parsed as a full SQL statement. The speedup comes when you prepare a statement once and then execute it many times; the canonical example being inserting multiple records into the same table. In this case, the database engine needs to parse, optimize, etc. only once.

Now, one gotcha is with database abstraction libraries. They sometimes fake it by just inserting the bound variables into the SQL statement with the proper escaping. Still, that is better than doing it yourself.

Thanks wink
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Perryz schreef:
Eerdere citaten tonen
Antonn schreef:
Ohhja is andere image, beter gebruik je sprites. Dan heb je geenflikker effect en doe je maar 1 aanvraag wat load bespaart.
Had ik ook al geprobeerd maar dan slide hij in vanaf onder..?
Dan doe je 3 divjes over elkaar met elk een andere background-position en laat je de bovenste (2) divs weg en infaden met vanillajs
0
Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Iemand die een goede radio speler weet voor een radio. Heb al wat staan googleen en ik kom op enkelen uit maar die werken niet.

toevoeging op 7 april 2013, 15:37:30:
Het is voor radionomy.
0
Berichten
1.871
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
<object id="MediaPlayer1" width=180 height=50
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject" align="middle">
<param name="FileName" value="<--RADIONOMY LINK -->">
<param name="AutoStart" value="True">
<param name="ShowStatusBar" value="True">
<param name="DefaultFrame" value="mainFrame">
</object>


Niet getest
0
Berichten
6.037
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nielsjojo schreef:
<object id="MediaPlayer1" width=180 height=50
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject" align="middle">
<param name="FileName" value="<--RADIONOMY LINK -->">
<param name="AutoStart" value="True">
<param name="ShowStatusBar" value="True">
<param name="DefaultFrame" value="mainFrame">
</object>
Niet getest

Bedankt werkt. biggrin
0
Berichten
8.649
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Beter gebruik je nu HTML5 confused
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Ik heb alle icons in een mapje zitten maar nu bestaan deze niet?
http://jelle.s1.thns.eu/readme.html
Maar deze bestaan wel confused
Hoe kan ik dat oplossen?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren