Jump to content

BrainPill

Members
  • Posts

    123
  • Joined

  • Last visited

Everything posted by BrainPill

  1. I want to scan website content for having only English content. I was thinking about using file_get_contents and read the page , but from here its unclear. Like when using some kind of regex like this if (!preg_match('/[^A-Za-z0-9]/', $string)) because file_get_contents() also gets html tags and so on. Is there a way to block non English language groups and how is this done?
  2. it could be. I tested it now in another browser (Brave) and here the web address didnt give a tooltip. But what causes these differences? Autofill? How can I control that?
  3. Hi my server setup is WAMP offline. My virus scanner is Windows Defender. I have created a form in html where the user can submit a series of links. I do not use the attribute alt or other javascript code for a tooltip on the page. I created a random https address url list to check the header status and when 200/301/302/303 true; I use file_get_contents() to scan the (malicious) sites their content. now 1 of the input fields has a https link address and when hovering over the input box there will be a tool tip with the link address. The other input form fields dont give a tooltip ( alt popup) when hovering over it. Is this a virus or can it also be a bug? I read online about a tooltip virus.
  4. I want a string input of minutes into minutes with leading zeros I use date() for this <php $time_in_min ='7'; $minutes = date("i" ,$time_in_min) ; var_dump($minutes); ?> but all I get is 00 while i according to the date() param explanation should give a leading zero. Like :07 How should this be solved?
  5. what are case insensitive CONSTANTS ? I understand what case insensitive is, but not what or when a constant is used. my questions are: can programmers cast their own constants? if so: how? Does PHP have built-in constants ? where can I find a survey of php built in constants online?
  6. I see, but the example does not lead to the desired result. its more like this: script 1: <?php include 'script2.php'; // execute code ?> script 2: <?php fictive_phpfunction_to_track_back_include(); // of course this is pseudo code, just to give an example ---------------- /* the example above will output referred from: script1.php */ // script code ?>
  7. I dont know much about AJAX and dont believe your solution is what I try to ask. Like var_dump verbose shows the location and the line number of a variable. Of course that is just an example of how PHP code can work. What I want to say is that it is certainly very useful if there was a specific PHP command that could give a list of the scripts that links towards it with either include or require. But I can't write PHP code myself. It could be people made it and that it might be scheduled for updates of PHP in the future.
  8. sorry I think its too much to place all my code here. I hope I can make a test simulation maybe in the future.
  9. Is there a function or command in php to output the backtrack of include en require. Like when you include a script in a file; the included script should be able to produce the track dump on the screen, so the programmer knows where from the include is coming. Does that exist and what is the name of that command? Or is there anyone that made an own function performing the action above and how?
  10. Not sure if the problem is a php problem. Most of the times my cookie settings work well but it seems to happen arbitrary that a cookie is read out by php and not read out. If I check 2 different settings with the link click procedure (explained in my last posting) and I do this 2 times then the first one works and instantly repeating the procedure skips the condition , the $_COOKIE dump does not show all cookies (does it the first time) .
  11. The situation is that the user 1) fills in a form and the cookie is set 2) an email is sent to the user 3) user clicks to an activation page. what do you mean with reload, is there a possibility to reload with PHP or do you mean it can be done with headers?
  12. I am trying to set a cookie that expires in 20 minutes. The cookie is set i can see it in google chrome. but when I try to read the values with var_dump($_COOKIE) the specific cookie is not shown. Only if I shut down the browser first the cookie is readable for the php script. How can I make this readable instantly? Should I change header settings and in what way?
  13. I found the location of the browser cache here C:\Users\myname\AppData\Local\Google\Chrome\User Data\Default\Cache but I cant read the content of the files . The file list goes back to end september but some remembered cache data are from over a decade ago. What kind of files are this and how 'safe' is it?
  14. My question is about autocompletion or autofill. (is there a difference between these 2 definitions?) I can't get where input names or input urls or input emails are 'stored'. Its related to forms I made in html/css but the same thing occurs when going to a forum being on multiple years ago. The username is still there often with the credentials. The main question is: Where is this stored ?
  15. But I want this to be selected from the same table found in multiple databases. Anyone got a clue how to do this?
  16. solved it by using ORDER BY person_id DESC LIMIT 6
  17. I have a query it goes like this: SELECT `person_id` , MAX(exam_score) FROM `results` GROUP BY `exam_score` exam_score is column and some values are double when using query above I get 1 result for each. So if the exam_score is 10, 8, 9 , 10, 8, 5, 3 10 , 6 it does: 10, 9, 8 , 6, 5, 3 while I would want: 10,10,10, 9, 8, 8
  18. Hello I would like to create a script that counts the number of times a link is clicked on. I think using the tag/attribute <a href=" "> is not useful as it is not possible to put an attribute like value='<?php echo $count ; ?>' in it. Can it be done in php only or should I use javascript or jquery too?
  19. sorry I dont get it completely. Maybe it is useful to make checked attrib variable. But it does not change the effect of the button going back in the checked position. and what do you try to say with: $_POST['ok'] .
  20. The same principle is found here button slide example my problem is how to get the value of the radio button towards php
  21. maybe its more a css matter, not sure if this is the correct subforum
  22. the script has a radio button styled in a specific way. removing the checked option from the html part results in a wrong designed button. using the <form> tag makes only the unchecked button clickable. using javascript location.href towards this page or another gives the same effect as <form>, its partially unclickable. the code: <html> <head> <style type="text/css"> body, html { background: #954535; display: flex; justify-content: center; align-items: center; min-height: 100%; z-index: -1; } .btn_bl { border: 3px solid yellow; font-family: "Trebuchet MS", Helvetica, sans-serif; font-size: 12px; letter-spacing: 2px; word-spacing: 2px; font-weight: 700; text-decoration: none; font-style: normal; font-variant: normal; text-transform: uppercase; display: inline-block; padding: 10px; position: relative; text-align: center; transition: background 600ms ease, color 600ms ease; } input[type="radio"].toggle { display: none; } input[type="radio"].toggle + label { cursor: pointer; min-width: 60px; } input[type="radio"].toggle + label:hover { background: none; color: yellow; font-family: "Trebuchet MS", Helvetica, sans-serif; font-size: 12px; letter-spacing: 2px; word-spacing: 2px; font-weight: 700; text-decoration: none; font-style: normal; font-variant: normal; text-transform: uppercase; } input[type="radio"].toggle + label:after { background: #CFECEC; content: ""; height: 100%; position: absolute; top: 0; transition: left 200ms cubic-bezier(0.77, 0, 0.175, 1); width: 100%; z-index: -1; } input[type="radio"].toggle.toggle-left + label { border-right: 0; } input[type="radio"].toggle.toggle-left + label:after { left: 100%; } input[type="radio"].toggle.toggle-right + label { margin-left: -5px; } input[type="radio"].toggle.toggle-right + label:after { left: -100%; } input[type="radio"].toggle:checked + label { cursor: default; color: darkgrey; transition: color 200ms; font-family: "Trebuchet MS", Helvetica, sans-serif; font-size: 12px; letter-spacing: 2px; word-spacing: 2px; font-weight: 700; text-decoration: none; font-style: normal; font-variant: normal; text-transform: uppercase; } input[type="radio"].toggle:checked + label:after { left: 0; } </style> </head> <body><center> <br><br><br><br> <input id="toggle-on" class="toggle toggle-left" name="toggle" value="y" onChange="this.form.submit();" type="radio" checked> <label for="toggle-on" class="btn_bl">Yes</label> <input id="toggle-off" class="toggle toggle-right" name="toggle" value="n" onChange="this.form.submit();" type="radio" > <label for="toggle-off" class="btn_bl">No</label> <?php if(isset($_POST['toggle'])) { var_dump($_POST['toggle']); } ?> </center> </body> </html>
  23. is that the only way? I try to avoid javascript and client side scripting too much. Can it be done in php?
  24. I made this code, but I would like the radio button to only be checked the first time the page is visited after that a user should be able to switch and get the form values in php example: How can I fix this?
×
×
  • Create New...