Jump to content

moose-en-a-gant

Members
  • Posts

    164
  • Joined

  • Last visited

Everything posted by moose-en-a-gant

  1. Well the proposed method above does not work, so for now I will do what I know how to d which is to redirect, I've got the browser type down so I'll check which browser it is first then redirect, this is not a fool-proof plan... ideally you don't build websites like I did but I"ll figure it out.
  2. The internet explorer browser is still not getting detected properly I don't understand this $browser['browser'] I mean I think I do, it looks the same as $errors['username'] for example or $_SESSION['user'] It's just an array right? I tried to not check for non-caps using this line $browser_na = ($browser['browser']); I guess I'll look and see if I can find an internet explorer specific word that is lower case to use
  3. Even better a photo! Yeah something seems off, my friend is testing internet explorer and this is the output your browser is chrome Array ( [browser_name_regex] => §^mozilla/4\.0 \(compatible; msie 8\.0.*; .*windows nt 6\.0.*wow64.*trident/4\.0.*$§ [browser_name_pattern] => Mozilla/4.0 (compatible; MSIE 8.0*; *Windows NT 6.0*WOW64*Trident/4.0* [parent] => IE 8.0 [platform] => WinVista [platform_version] => 6.0 [win32] => [win64] => 1 [comment] => IE 8.0 [browser] => IE [version] => 8.0 [majorver] => 8 [frames] => 1 [iframes] => 1 [tables] => 1 [cookies] => 1 [backgroundsounds] => 1 [javascript] => 1 [vbscript] => 1 [javaapplets] => 1 [activexcontrols] => 1 [cssversion] => 2 [minorver] => 0 [alpha] => [beta] => [win16] => [ismobiledevice] => [istablet] => [issyndicationreader] => [crawler] => [aolversion] => 0 ) ahhhh.... IE
  4. The internet catch doesn't seem to be triggering I have tried internet, net, explorer
  5. Yeah so now I have gotten help on determining the browser type, I think I can modify html elements directly, eg. php determines the values to be parsed as HTML but what about CSS? For example in input[name="userrname"]{ border-right: none; } I want that to be conditional eg. input[name="userrname"]{ if($type==chrome){ border-right: none; } } ^^ that does not work so far I think I will try something like this input[name="userrname"]{ <?php if($type==chrome){ echo "border-right: none"; }?> }
  6. Oh like probability The array or "string" to be checked comes from get_browser yeah this did cross my mind too but I had hoped the Capital first lettere rest lower case would have worked, since that is how they have the output shown At any rate, thank you
  7. Crap I do intend to mark CroNiX's answer as the solution but I don't know how it works Where is the comparison, I mean it is the == but is it the $browser['browser'] ?
  8. Ha wow that's great it works. I explained the array_slice above, it was to isolate the index that said the browser name from the two test browsers Chromium and Firefox in Linux, array index # 6 is the browser, I counted the brackets by hand haha, tap, tap, tap Anyway thank you for this, now I can fix my nightmare situation with my interface
  9. I'm specifically targetting the index [browser] What I'm really after is to use get_browser() to return the browser type and then knowing this I can do specific changes to a website I'm trying to accomplish it by string matching the browser names to the array output of get_browser() I have isolated the [browser] as to me this tells you the name of the browser so that is my I'm confused why the array_slice is not matching since it worked for one but not the others and the index count / position has not changed
  10. what does this mean? Usually when I try to output that, I just get "boolean(true)" or 1 Here's the output your browser is chromium Array ( [browser_name_regex] => §^mozilla/5\.0 \(.*linux x86_64.*\) applewebkit/.* \(khtml, like gecko\).*ubuntu.*chromium/39\..*chrome/.*safari/.*$§ [browser_name_pattern] => Mozilla/5.0 (*Linux x86_64*) AppleWebKit/* (KHTML, like Gecko)*Ubuntu*Chromium/39.*Chrome/*Safari/* [parent] => Chromium 39.0 [platform] => Ubuntu [comment] => Chromium 39.0 [browser] => Chromium [version] => 39.0 [majorver] => 39 [frames] => 1 [iframes] => 1 [tables] => 1 [cookies] => 1 [javascript] => 1 [javaapplets] => 1 [cssversion] => 3 [minorver] => 0 [platform_version] => unknown [alpha] => [beta] => [win16] => [win32] => [win64] => [backgroundsounds] => [vbscript] => [activexcontrols] => [ismobiledevice] => [istablet] => [issyndicationreader] => [crawler] => [aolversion] => 0 ) Array ( [browser] => Chromium ) from this code: <?php $browsee = get_browser(null,true); $array = (array_slice($browsee,5,-24)); if(in_array("Firefox",$array)){ echo "your browser is firefox"; }else if(in_array("Chromium",$array)){ echo "your browser is chromium"; }else if(in_array("Chrome",$array)){ echo "your browser is chrome"; }else if(in_array("Explorer",$array)){ echo "your browser is Internet Explorer"; }else{ echo "your browser was not detected"; } echo '<br>'; echo '<br>'; print_r($browsee); echo '<br>'; echo '<br>'; print_r($array); ?>
  11. I'm trying to do a string match of a "what is my browser" return I counted the indexes, there are 30 I have this code, I tested four different browsers, Internet Explorer, Chrome, Chromium, Firefox Only chromium works, why? I counted the indexes for both Firefox and Chromium output, they are identical unless I miscounted I don't have internet explorer or chrome, I had a friend test pull up the link that has this code <?php $browsee = get_browser(null,true); $array = (array_slice($browsee,5,-24)); if(in_array("Firefox",$array)){ echo "your browser is firefox"; }else if(in_array("Chromium",$array)){ echo "your browser is chromium"; }else if(in_array("Chrome",$array)){ echo "your browser is chrome"; }else if(in_array("Explorer",$array)){ echo "your browser is Internet Explorer"; }else{ echo "your browser was not detected"; } echo '<br>'; echo '<br>'; print_r($browsee); ?> These are screenshots of the two browsers I use (I'm a Linux user)
  12. border solution doesn't work, I'll have to look into alternate images
  13. What do you mean? The only textarea I use is "content", this accepts any strings, urls, paragraphs, etc... the rest are either Int's or Varchars I have used the string concatenation solution temporarily as it was all that I needed but some suggestions came to mind which I view as a must for the tool to function correctly.
  14. God what a nightmare, it's perfect in Firefox but not in TOR, or Chrome, ahhhhhhh I'm interested in that scaling idea of yours if you happen to come back to this thread I suppose I could write a conditional statement like "If this browser, change picture dimensions to something" Not sure... Yeah so the fix would be to decrease the width of the input fields, I imagine the problem is the size of the stock font varying from one browser to the next. Which actually I have not specified a font size, I'll try that. Otherwise my current thought is something like this, not quite literally but the logic follows this flow if(browser="firefox"){ <img width=" number " height="number"> }else { <same img width=" < than above " height="same as above"> } Yeah it's not the font. It appears to be the border of the input fields ehhhh this is why people don't do this haha Yeah if I remove the border-right and set it to : none; the picture is perfect again... hmm I imagine I'll have to display alternate image/form widths somehow based on browser... or do it right? haha I'll try to fix it by making the border problem not exist, since the photos seem to scale fine anyway everywhere else in any browser, it's the border of the input fields.
  15. Wow that was great. So thorough! Yeah I have that problem of jumping too soon before I can stand. That's great, the remember me part is nice for future applications I think the 'standard' cookie is what I am after for the mobile aspect where a person switches browser pages I don't see this 'standard' cookie, literally the word 'standard' is that colloquial? I'm looking at this page http://php.net/manual/en/function.setcookie.php Some people have phones that can multitask eg. split screen top/bottom which can view both simultaneously but I assume most people (including myself) don't have that ability maybe Windows 9 Okay I will apply what you have written, thank you very much I like that check exist aspect as well Come to think of it, people can't really log out if they wanted to yet haha oops... at least they are logged out anyway eg. session is lost with the current setup but I'll create a log out button. I was concerned about the save path, it did seem counter-intuitive to store a secret thing in a public place
  16. I didn't see the huge entry written by wezhind I'll catch up and read on that, also will modify the mobile section which is where I was having the problems, I've only modified the desktop at the moment.
  17. I don't know... I have one table that users write into. There are generally five fields, although it will increase: ID, username, content, keyphrase, date People can write in random orders so when a specific user pulls up their content, the ID's are off... I don't know if it's pointless for me to re-explain again. So you've got these row ID outputs 2,5,87,93,100,393, and they are pulled by themselves so they could be treated as 1,2,3,4,5,6 Then, when the rows are swapped by the ^ button, they change in order and consequently their ID values change in the table I don't know if I can do that, would I need an empty row to use as a temporary place holder?
  18. Yeah I just, what you said makes sense. I like to think that anything is possible, it's simply a matter of engineering or finding a way to solve the problem. I mean it's just data you know, that's the beauty of all of this, it's not manufacturing, raw resources... it's electricity. A man could make so much money with a cheap computer, a link to the internet and time. Anyway, I'll see what I can come up with. I may look into that browser idea which already may be a useless thought because of that problem of causing problems on my end and me getting blamed. Thanks for your input.
  19. What do you mean by this? Isn't the problem tracking? Eg. overlays like words, hyperlinks, text fields, become displaced depending on scale? Initially that was the plan, the white words are on the photo, but I dissected them and used them as a background for a click-able div element. The text fields were going to be on the photo but I figured that would have been a tracking problem so I made them directly in a photo. The design above is meant for a landscape design, it's not ideal for portrait so I redirect to a different design for portrait. Thanks
  20. What is the point of the cookie then? It sounds like I don't need it / shouldn't use it.
  21. I have this interesting problem, I think I know how to do it. In a java class I took there was a lab on swapping the values of variables and if there were two variables, you needed a third temporary value holder. So this project I'm working on has a row output, currently the individual values are outputted as a concatenated string but ideally they would be independent rows with accompanying buttons. One of those buttons is a ^ symbol, when you press this, ideally the row is moved up in ID putting the previous ID in front or ahead. The problem is that the ID's / rows are not necessarily in sequential order. So, when I recall a set of rows that have random sequential values for example, 2, 5, 27, 41, 43 and those are outputted by themselves, now becoming 0,1,2,3,4 respectively or 1,2,3,4,5 So when I try to move 43 to position 2, that's 4 positions away or 4 clicks of the ^ button. Now how do you deal with that 4 difference and the difference of 41... ? thereby, when the initial set of rows are recalled again, the order is now, 43, 5, 27, 41, 2 Of course the ID I think remains the same but the data is switched... ? yeah I have to draw some pictures, but this isn't a current problem to fix, later on down the road after I update the interface. here is a drawing to explain, I'm more of a visual person Any ideas would be appreciated, otherwise I will post my solution when I come to it. Or I don't figure it out and find one. thanks
  22. Yeah I think the cookie doesn't work, after using this conditional statement, I still have to call $_SESSION for the user to be known if(empty($_COOKIE)){ $userrname = $_SESSION['user']; }else { $userrname = $_COOKIE[$cookie_name]; } $userrname = $_SESSION['user'];
  23. I'm working on this now, I'm wondering if cookies are not enabled on the client' side, if sessions are interchangeable, my current train of thought is to set the session value using the username then pass this to the cookie and both can be used... I think the key is session is server, cookie is client... so in my case of the phone, that's probably was is going on. I'm going to implement the changes... 3:56 AM, I have 8 pages to modify I'm wondering what is an appropriate session / cookie lifetime, a day? or an hour? not sure... I have to read up / picked this code up too, I don't know when it is triggered ini_set('session.gc_probability', 1); 4:54 AM Okay so, so far... this is what I'm doing... this seems redundant eg. dumb These are in order but not necessarily sequentially just in terms of hierarchy This is on index, / mobile-index session_save_path('/home/admin2/public_html/sesh'); ini_set('session.gc_probability', 1); session_start(); $_SESSION['user']=$userrname; $cookie_name = "user"; Then I get redirected to a new page, userpanel or userpanel-mobile This is where it gets redundant ** actually I may have fixed the redundant part These three again are together and precede the rest session_save_path('/home/admin2/public_html/sesh'); ini_set('session.gc_probability', 1); session_start(); if( !isset($_SESSION['last_access']) || (time() - $_SESSION['last_access']) > 60 ) $_SESSION['last_access'] = time(); if(empty($_COOKIE)){ $userrname = $_SESSION['user']; }else { $userrname = $_COOKIE[$cookie_name]; } the if...last_access thing is another piece of code I picked up randomly, not sure if I need it. so far this works on laptop, I have to test it on mobile which I have to redesign the interface.
  24. This interface was created by dissecting the photo that you see into 20 pieces, and floating them to the left within a container. I would like to know if I could individually scale the pieces together, with the same multiplying factor after the multiplying factor has been determined from the device's screen resolution.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.