Jump to content

dreamwest

Members
  • Posts

    1,223
  • Joined

  • Last visited

    Never

Everything posted by dreamwest

  1. You know i COULD do a simple search on these functions to find out the specifics....but im too lazy Im !assuming! it flushes the contents of the browser buffer to be displayed...i think one of them does anyway
  2. Why did the koala fall outta the tree.......?? Cause it died!! ----------------------- A truly wise man never plays leapfrog with a unicorn.
  3. Its ajax and javascript on roids Theyre proberly using ob, flush etc.. stuff as well........and maybe even smarty caching I'm not sure you have a clue what your talking about, but it is very amusing. True. I have no idea HOW it works, but it works. ob_end_flush(); ob_flush(); flush(); ob_start(); Most successful ppl know - you dont need to know everything to be successful, in fact here are some truths about being successful: *The key to success is laziness *Good thing im not intelligent - otherwise ill have a "good job" <-emphasis on good job HA! *The less you do the more you earn *Duplication is the key to success The moral of the story:
  4. Hey im rich and happy - what do i care You can be pulled around all your life from one "generated crisis" after another - the world isnt perfect, i know i can live with that
  5. Its ajax and javascript on roids Theyre proberly using ob, flush etc.. stuff as well........and maybe even smarty caching
  6. You can build and Million+ page site with a few lines a code, include the header and footer and your done. Of course this doesnt mean all your urls will be the same, make them dynamic with 1 line of htaccess : RewriteRule ^view=(.*) view.php?id=$1 [L,QSA]
  7. OK ive improved it: session_start(); error_reporting( 0 ); function redirect( $url ){ if (! headers_sent( ) ){ header( "Location: ".$url ); exit( 0 ); } echo "<script language=Javascript>document.location.href='".$url."';</script>"; exit( 0 ); } $_SESSION = array(); if (isset($_COOKIE[session_name()])) { setcookie(session_name(), '', time()-42000, '/'); } session_destroy(); redirect('/');
  8. But thats all logout.php will contain: session_start(); session_destroy(); ...and maybe a redirect to the main page. I tested it - I destroyed the session and went to another page on the same site and the session was gone..... Magic
  9. Now I just need to get the Cronjob setup, I need to figure out how to make it update all the images that have been created.. Continually update an image that hasnt changed?? I thought i was bored :-\
  10. Logout: session_start(); session_destroy(); Ive seen some ppl make logout script 6 KB in size, what are they thinking - its so easy Login: session_start(); $_SESSION['userid'] = 'name here';
  11. Its not the site thats great, its the page loading speed thats the beauty. Other than that the site is pretty ordinary. If this is a Metasearcher they need to be given an award, most metasearchers take 2-6 seconds for a request
  12. Your productivity will increase dramatically with ajax http request, im able to process 1000's of database requests within a few minuets through my admin panel without 1 page reload.
  13. preg stuff uses more resources and should be used sparingly, explode and str_replace are better alternatives for looping data Im assuming the dictionary has over 500 words in it so: for($i=0;$i<count($dictionary);$i++){ $parts = preg_replace("/\b$dictionary[$i]\b/", $htmldictionary[$i], $parts); $parts = preg_replace("/\b" . strtoupper($dictionary[$i]) . "\b/", $htmldictionary_u[$i], $parts); $parts = preg_replace("/\b" . ucfirst($dictionary[$i]) . "\b/", $htmldictionary_u1[$i], $parts); $parts = preg_replace("/\b" . ucwords($dictionary[$i]) . "\b/", $htmldictionary_ucwords[$i], $parts); } Is executing for each word. Change it all to str_replace
  14. If title is a variable and your calling it before you defined it, of course it wont display anything <?php echo "<title>{$title_name}</title>"; $title_name = "Title here"; ?> You will need functions.php above the title tag <?php include('functions.php'); //which has the $title_name variable in it echo "<title>{$title_name}</title>"; ?>
  15. You can set the fields as UNIQUE, but that will crash your script if you try to add a duplicate, heres an easy way: if ( $_POST ['Submit']){ $username = mysql_real_escape_string($_POST ['usernm']); $userpassword = mysql_real_escape_string($_POST ['userpw']); $result = mysql_query("SELECT usernm FROM users WHERE usernm='{$username}' and userpw='{$userpassword}' "); if($result){ $num = mysql_num_rows( $result ); if ($num == 0) { $querypost = mysql_query ("INSERT INTO users (usernm, userpw) VALUES ('$username','$userpassword')"); } } }
  16. Not only that but theres no page reloading which makes the user experience faster than google Page reloading is on its way out - FINALLY!
  17. Have you ever seen anything so beautiful: http://fireball.de/ajax.asp?Auswahl=deutschem+Web&q=funny&Button=Submit+Query#3 I almost cried its so fast :'(
  18. I found this, it improves the image by up to 200% $im = new imagick( "test.png" ); $im->contrastImage( 1 ); $im->adaptiveBlurImage( 1, 1 ); //output header( "Content-Type: image/png" ); echo $im; But im still curious if there is something else i can add to this to get an even better image
  19. I want to increase photo quality and give it a touch of HD glamour. Ill need to put it thorugh some filters- Sharpen, resolution etc..
  20. Im trying to improve the quality of some images, they are all jpg. What is the best Imagemagik or GD function to do this??
  21. Where is curl located? IN the include script?? You just need the url for curl to post to, then set the curl_setopt you want. In your form you only need what you are posting nothing more. Your form action should point to where curl is. curl is quite easy once you play with it a bit, then youll want to learn multi handle function curl_multi_add_handle, you can literally open 1000 pages within seconds and post to them all
  22. Ive revised this, this will give you title, player and thumb $src = file_get_contents("http://gdata.youtube.com/feeds/videos?vq=Gitano%20corazon&start-index=1&max-results=10"); preg_match_all('~<media:player url\s?=\s?[\'"](.*?)</media:title>~is', $src, $match); foreach ($match[1] as $stuff) { $tmb = explode('watch?v=',$stuff); $tmb = explode('&feature',$tmb[1]); $tmb = $tmb[0]; $title = explode("<media:title type='plain'>",$stuff); $title = $title[1]; $play = explode("'/><media:thumbnail",$stuff); $play = $play[0]; echo "<img src='http://i.ytimg.com/vi/{$tmb}/2.jpg' height='90' width='120'><br>Title: {$title}<br>Player: {$play}<br>"; }
  23. Personally i would never store images in a database - store them in your filesystem, then you can compress and cache them. Then use ob_flush(); etc to boost your loading times
  24. Most likely ajax http request, its not really including another page just requesting it without reloading
×
×
  • 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.