Reputation Activity
-
ELITE reacted to BrowserBugs in URL TokenI would say yes to store a session against a user and you should also store where the requests came from. This data is great to work out usage and also helpful to detect abnormal behaviour. As to the token length of time or if to refresh, i'm guessing this is some sort of api connecting from their end so the token validates the request, if so then there's no point in changing it.
-
ELITE got a reaction from ChrisSoutham in htaccess friendly url problemRewriteEngine On RewriteRule ^oak-furniture/([A-Za-z0-9-]+)/?$ oak-furniture.php?oak-furniture=$1 [NC] this worked for me thanks for pointing out my copy and paste error
-
ELITE reacted to ChrisSoutham in htaccess friendly url problemYou didn't say there was an error?
Add something like print_r($_GET) or var_dump($_GET) and see if the variable is being passed though. In your original call you say ?oak-furniture= whereas your .htaccess file says ?id=
-
ELITE reacted to mteam in JQuery cycle no longer with prev and next buttonsYou've got a minus z-index on your container
-
ELITE got a reaction from deanlynn in Duplicate ContentIf it is of any use to you from Googleing around i found that you can report duplicate content to Google and you can also use an adon to Google Chrome to make it easier
https://chrome.google.com/webstore/detail/google-webspam-report-by-/efinmbicabejjhjafeidhfbojhnfiepj
-
ELITE got a reaction from Kaskhautual in unzip a zipped folder into the rootHi All, i am trying to unzip the contents of a zipped folder into the root of the site, i can only make it work by extracting the contents and creating a directory with the same name of the zipped folder, so i have a directory called zip when i run the below php
<?php $zip = new ZipArchive; if ($zip->open('zip.zip') === TRUE) { $zip->extractTo('unzip.dev'); $zip->close(); echo 'ok'; } else { echo 'failed'; } ?> what i woluld like is the contents of zip.zip to be in the unzip.dev directory
any ideas?
Thanks
-
ELITE reacted to Sendoushi in sublime 2 and transmitTransmit lets you make a "drive folder" from your ftp ("Mount favorite as disk"). Then you just have to open the file you want and code directly. I also use both apps (considering Brackets for dev).
-
ELITE got a reaction from predatorx in Foundation 3 navigation and Fancybox javascript clashyou have the jquery library included twice i have removed line 306 and it seems to be working for me
-
ELITE got a reaction from Nillervision in Foundation 3 navigation and Fancybox javascript clashyou have the jquery library included twice i have removed line 306 and it seems to be working for me
-
ELITE got a reaction from jerOpporpViof in sublime 2 and transmitHi All, i have been using dreamweaver for 5 years in code view, i decided to look for something more suitable for PHP and i went for Sublime 2 and for ftp i used transmit, i have seen it used when you save your file it puts it to the server, i have looked for tutorial for this but cant find it, does any one know how to do this?
Thanks
-
ELITE reacted to Skateside in ajax count files in directoryif (Array.isArray(data.files)) { data.files.forEach(function (file) { console.log(file); }); } Essentially, that's how you want to do it.
-
ELITE got a reaction from KalobTaulien in Array loop not workingsolved it
$list[] = array("$file");
-
ELITE got a reaction from adsegzy in How do I pull rows from mysql with Javascript onchange functionone way i think may work for you is to use Jquery onchange
http://api.jquery.com/change/
from there you can use Jquery Ajax to post the drop down value to another file containing your select query to fetch the correct states to populate your select drop down options
http://api.jquery.com/jQuery.post/
hope it helps
-
ELITE reacted to jec in Mastering JavascriptPlease do not do this. jQuery is an absolutely great library but nothing will beat having a very firm understanding and grasp of JS. Learn JS and everything else will fall into place. JS has been around since 95 I think, jQuery is fairly new and as with anything new some things become fads and others replaced on a regular basis by something new and better. I am not saying jQuery will become obsolete anytime soon, or if ever; it is no secret that jQuery has greatly improved upon the downfalls of JS, but it is good to keep in mind that it is important to learn the foundation of a language and build upon it from there. There is nothing saying you can't learn both together as well.
Regardless of what direction you take, good luck!
-
ELITE reacted to heydanreeves in What property am I missing?Add
overflow:hidden; to #container_un.
Edit: For clarification, elements whose children are all floated collapse their height. Adding overflow:hidden; is a fix for this.
-
or you can use file_get_contents and file_put_contents
-
ELITE reacted to Jason Dexter in ahrefs.comI'd say he's paying for nothing. There might be the odd occassion where backlinks aren't picked up but they have to be pretty obscure.
Ask him to request work reports. Any seo will keep a record of everything they do
-
ELITE got a reaction from darrenbale in Edit css from within website, like wordpress editorHi, this may get you started.
<?php $test = "test.css"; $fh = fopen($test, 'r'); $newcss = fgets($fh); fclose($fh); ?>
that opens the file
put $newcss inside an editor
<textarea><?php echo $newcss; ?></textarea>
so they can edit the css file
When they submit call the below php that will overwrite the css file
<?php $test = "test.css"; $fh = fopen($test, 'w') or die("can't open file"); $css = "$newcss"; fwrite($fh, $css); fclose($fh); ?>
not tested but not far off
-
ELITE got a reaction from AlexsDesign in Get external file....Hi, is there a good reason why you cant have the javascript file on your server
or try this you can work around it
<?php $file = file_get_contents('http://www.example.com/js/required-file.js'); echo $file; ?>
I think this will still give you a problem with SSL
-
ELITE got a reaction from AlexsDesign in Get external file....I have just tried it on a site with an SSL and it is working with file_get_contents
-
ELITE reacted to Renaissance-Design in Styleing SelectFor future reference, always put the official CSS version of a property after any vendor-prefixed versions:
-moz-border-radius: 20px; -webkit-border-radius: 20px; border-radius: 20px;
Browsers always implement the last version of a property they recognise, so it makes sense to ensure that the last version the browser encounters is the official one.
Selects do accept border-radius, so what I think you're experiencing there is some sort of clash or bug that's only manifesting itself in Webkit.
-
mm the most common way is
<img src="captcha.php" width="140" height="30" />
since captcha.php is outputting an image it can be treated like an image
-
ELITE got a reaction from Pete Prosper in Website not working on PCmay be worth looking at this
<!--[if IE]> <style> body {background: #EEE; color: #000; behavior: url(csshover.htc);} div#nav ul.level1 li.submenu:hover ul.level2 {display:block;border:none;} div#nav li.end{ width: 9.2em; border-right:none; line-height:1.3em;} <![endif]-->
you seem to be missing </style>
-
ELITE reacted to Pete Prosper in Help With OOPIn terms of coding, it's still not an ideal class.
There's no constructor, no access modifiers, no getters or setters, etc etc. Also, you're using the "var" keyword which is deprecated and not needed and your methods aren't being used properly.
That's at a quick glance.
Edit: I realized I didn't really give a good explanation of what I meant when I said the "your methods aren't being used properly". Some users above me wrote about the the proper use of properties and methods and how they relate to the class.
-
ELITE reacted to webdeveloper93 in Help With OOPtheres not a whole bunch you can do with a simple class like yours but heres a little better version
<?php class tax { private $tax; private $price; private $addedTax; /** *Our construct **/ public function __construct($tax){ $this->tax = $tax; } /** *Add the tax **/ public function add() { $this->addedTax = number_format($this->tax/100*20, 2, '.', ''); return $this->addedTax; } /** *Get the price **/ public function get_price() { $this->addedTax = number_format($this->tax/100*20, 2, '.', ''); $this->price = number_format($this->tax-$this->addedTax,2,'.',''); return $this->price; } } ?>