Jump to content

DarkSuperHero

Members
  • Posts

    342
  • Joined

  • Last visited

Everything posted by DarkSuperHero

  1. $content = $article -> text; $keywords = $this -> params->def('keywords'); $words = explode(",", $keywords); $keywordLinks = $this -> params->def('links'); $Links = explode(",", $keywordLinks); $number = count($words); for($x = 0; $x <= count($words); $x++) { if(preg_match_all("/(".$words[$x].")+/i", $content, $matches)) //changes it to parenthesis and removed /b's { foreach($matches[0] as $change) { $content = str_replace($change, str_replace($words[$x], '<a href = "'.$Links[$x].'">'.$words[$x].'</a>', $change), $content); } } } $article -> text = $content; maybe?
  2. I think that what the rv20 is trying to get at is that he doesnt care what the original value is, if he finds a value that creates that hash it is good enough because even if its a collision it will allow him access to what ever that "password" protected are allows access to.... right rv20 ?
  3. so is this a 3rd party script? Maybe you can get some help from the creators? whats the name of the script your using? I'm not entirely sure how the code works, but look like it was design explicitly for use with images... My guess is this information is passed on to yet another script which handle the image request and such... Also I think the getGallery function gets all the files...you need to add a conditional statement like... if(preg_match("/(\.pdf)+/",$photo)) //if the file name contains '.pdf' then...echo location or do something... { echo "this is a pdf<br>\n"; } else { echo "this is a regular jpg<br>\n"; } Also, how much PHP do you know? how new are you to this? Next try, post it here and we can point you in the right direction.... Cheers!
  4. Opimitized Misspelled word.... Could be jazzed up a tad more.... not very very appealing colors IMO... The rainbow colors at the top (the thin line) is kinda distracting, maybe thicken it up a tad ? make the colors blend in more...the green there is too bright for me.... renderes well in Chrome as expected.. Cheers!
  5. <?php if($_POST['Submit']){ $open = fopen("text.php","w+"); $text = $_POST['update']; fwrite($open, urldecode($text)); fclose($open); echo "File updated.<br />"; /* This Section displays the file's contents... look into file() on php.net for more details on how it works... echo "File:<br />"; $file = file("text.php"); foreach($file as $text) { echo $text."<br />"; } */ echo "<p><a href=\"./text.php\" target=_blank>click here to view the updated file</a></p>"; }else{ $file = file("text.php"); echo "<form action=\"".$PHP_SELF."\" method=\"post\">"; echo "<textarea Name=\"update\" id=\"phpCode\"cols=\"50\" rows=\"10\">"; foreach($file as $text) { echo $text; } echo "</textarea>"; echo "<BR><input name=\"Submit\" type=\"submit\" value=\"Update\" onClick=\"document.getElementById('phpCode').value = escape(document.getElementById('phpCode').value)\"/>\n </form>"; } ?>
  6. What type of information should we web developers be concerned about concealing that we would worry so much about hashing with salt ect?(im refering to other than the obvious cc/personal information which we my guess should be encrypted before its stored?) For example, if we have a database, would some one trying to get in have a higher chance of succeeding at accessing the database and changing the hash value to a known one, or would they have higher success rate obtaining the hash or a collision of the hash? Should I as a developer put more effort into making sure XSS and SQL injections and other security measures are up in place before loosing my hair over hashing/ encryption issues? I think i know the answers to these questions, but I thought I would get your views on some of this....
  7. your probably have to URL encode your $_POST['update'] text and then go ahead and unencode it when you write it to the php file.... <?php if($_POST['Submit']){ $open = fopen("text.php","w+"); $text = $_POST['update']; fwrite($open, urldecode($text)); fclose($open); echo "File updated.<br />"; echo "File:<br />"; $file = file("text.php"); foreach($file as $text) { echo $text."<br />"; } echo "<p><a href=\"./text.php\" target=_blank>click here to view the updated file</a></p>"; }else{ $file = file("text.php"); echo "<form action=\"".$PHP_SELF."\" method=\"post\">"; echo "<textarea Name=\"update\" id=\"phpCode\"cols=\"50\" rows=\"10\">"; foreach($file as $text) { echo $text; } echo "</textarea>"; echo "<BR><input name=\"Submit\" type=\"submit\" value=\"Update\" onClick=\"document.getElementById('phpCode').value = escape(document.getElementById('phpCode').value)\"/>\n </form>"; } ?> Try That... //Modified to edit source code...
  8. <tr><td>any cells between this will be considered one row</td> <td> any of these next to eachother will always go next to one another</td></tr> (tr = table row) if you wanted to avoid tables...then you could use a combination of different float and clear properties in css :-)
  9. j3n, this maybe a bit off topic, I did notice you have some ads down at the bottom right of your page....I was just wondering if you were going to keep that there...I think that may give people a reason not to contact you, eg. I was on pricing page, you said 1k for website, while ad at bottom gave me the option for a $199 custom website, to the less computer savvy person, that link would give them an excuse to get away from your site. Just a thought I would share... Cheers!
  10. if your server is running PHP 5 then you can use the following code... $dir = 'files/home'; //directory you want to iterate through foreach (new DirectoryIterator($files) as $fileInfo) { if($fileInfo->isDot()) continue; //if listing is a dot dont do anything continue with the script if(preg_match("/(\.pdf)+/",$fileInfo->getFilename())) //if the file name contains '.pdf' then...echo location or do something... { echo $fileInfo->getFilename() . "<br>\n"; } } http://us2.php.net/directoryiterator - Cheers!
  11. short answer to op, no...I would suggest using a div inside this div to create this spacing and give the appearance you may be looking for.
  12. How about registering it using PHP Sessions....just like cookie's but store on the server (correct me if im wrong).... http://www.tizag.com/phpT/phpsessions.php Are you having users log in during every visit, or want the site to remember them `across` different visits ? Cheers! :-)
  13. much like lots in stuff in life...its not a need but a want... :-P Hahahaha...when i started using this forum it took me a while to know that these tags existed also...just a suggestion is all... :-)
  14. I know we have the tags enabled already, and I know how to use them properly, although....I am suggesting we have a button next to the code button to insert these tags automatically exctly how the code tag works...is there anyway to make this happen currently ?
  15. how about calling a php page using URLLoader() ? have the page load something confirming a sign on.... you can also send data to the php script using some URLRequest() and URLVariables() ... :-) http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/URLLoader.html http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/URLRequest.html http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/URLVariables.html google has some great totorials...you can PM if you need any specific help....ive been submerged in Flash projects over the last couple months...so im getting to know it quite well :-)
  16. think of a frame as a mini window....it opens webpages inside of web pages i suppose.....if you want to look at it that way.... [php <FRAMESET ROWS="15%,*"> <FRAME SRC="recipetitlebar.html" NAME=TITLE SCROLLING=NO> /*this is saying, in this html doc open up the webpage recipetitlebar.html*/ <FRAMESET COLS="20%,*"> <FRAME SRC="recipesidebar.html" NAME=SIDEBAR> <FRAME SRC="recipes.html" NAME=RECIPES> </FRAMESET> </FRAMESET> [/code] so you have the top one at 15% of the oage at top...the remaining 85% is used for the other 2 column frames one of which is 20% wide.... Hope that helps...
  17. From what I can see your dealing with a 3x3 cell table, and i really see no reason to have colspans...i dont know how your css classes affect your cose...and you will probably need to make a wider bg image for the outline.gif, or set it to no repeat, and set a bg color... just a suggestion... <table width="200" height="200" border="0" cellpadding="0" cellspacing="0"> <tr> <td background="images/subc_left.png" width="9" height="36"></td> <td background="images/subc_head.png" width="182" height="36" align="center"> <div class="contentheader">Latest Posts</div> </td> <td background="images/subc_right.png" width="9" height="36"></td> </tr> <tr> <td background="images/outline.gif" width="9" height="154"></td> <!--//I set the width equal to the width of the corners--> <td background="images/content.gif" width="182" height="154" valign="top"><div class="subcontent"> This will be full of content<br> This will be full of content<br> This will be full of content<br> </div></td> <td background="images/outline.gif" width="9" height="154"></td> <!--//I set the width equal to the width of the corners--> </tr> <tr> <td background="images/subc_bottomleft.png" width="9" height="10"></td> <td background="images/subc_bottom.png" width="182" height="10"></td> <td background="images/subc_bottomright.png" width="9" height="10"></td> </tr> </table> I use to use tables for everything as well...but the day will come when you will find css and html tabless layouts to work to your advantage... :-D
  18. you best start reading up on some PHP tutorials... :-) It'll help you in the long run mate! and then you can post any question in the PHP Help section of the forum, where it gets more views anyways! :-) Cheers!
  19. Goafer check out the sticky post in this forum on HTML vs XHTML seems like IE doesnt serve up xHTML...and will always render it as HTML.....just some food for though :-)
  20. I've seen similar behavior in some of my projects while I was developing them and testing them in Chrome.... I never did find a root cause, but my final projects always ended up just fine.... My guess would be lack of browser events triggering ?
  21. i like techno/trance/Drum & Bass :-) I usually find myself pausing it or turning it down real low when im trying to wrap my head around something new/complicated :-P
  22. $(function() { //the following selector is for the image you are trying to select/change the src... $('.nav a img').hover( function() { this.src = 'new.jpg'; }, function() { this.src = 'old.jpg'; } ); }); and ironically.... http://lmgtfy.com/?q=jquery+img first result on google... :-) I hope this is what you were looking for..
  23. look into the built in ExternalInterface in AS3.... http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html this allows javascript to call a function/method inside your Flash Movie...... I would suggest flash is the best way to go for sound also....
  24. flash can also communicate with JS so then you can manipulate the DOM
  25. we probably need to see more code say about line 315-340 ? What happens is the php parser doesnt bring up an error until it thinks there is somethign wrong which might not always be exactly where the error is... but your probably missing an opening { way earlier in the code or have an extra } around 332 somewhere...
×
×
  • 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.