Jump to content

Lukeidiot

Members
  • Posts

    187
  • Joined

  • Last visited

Everything posted by Lukeidiot

  1. Hmm, I cant seem to get it to work, its only returning blank.
  2. So you are saying it does switch, IF its called within the 5 minute period?
  3. That is the part I cant understand I cant seem to think when to add it as started
  4. I understand that mostly, but what happens when I check for date_started when its set to default, or 0? Once everything resets, it may break the comparisons.
  5. When and how often do I set the date_started? I cant seem to comprehend how to not overwrite it each time.
  6. Thank you Jon, I will update you on my progress.
  7. Hello fine people of phpfreaks, I am trying to devise a way to only use 1 proxy for 5 minutes, once 5 minutes has passed, I need to mark that proxy as used, until all available proxies are used, then it should reset all and start over. It should work like this: -> proxy1 selected, use for 5 minutes, then go to next proxy... -> proxy2 selected, use for 5 minutes, then go to next proxy... -> proxy3 selected, use for 5 minutes, then go to next proxy... -> //end of proxies -> all proxies used, reset all, and reuse. Here is my table called "proxies" Any suggestions?
  8. What's the best way to add those options to this: I ask because when I assign the options, its also in array (making $options[CURLOPT_PROXY] = $this->getProxy(); throw an error because of the parenthesis)
  9. Hello fine people, I have a question today. Here is my code: My question is: How do I pass this function(image below) into my static variable? I tried CURLOPT_PROXY => self::getProxy(), But this didn't work. Any ideas?
  10. I am using lighttpd which does not support mod_rewrite, nor .htaccess. That is why I have to apply the regex directly to my server config file (lighttpd.conf).
  11. Well that is half the problem -- I'm not very good with regex. My main goal is to rewrite example.com/index.php?go=test to example.com/test/, then rewrite example.com/view/index.php?i=100 to example.com/view/1
  12. /html/sc5 is the server directory (the main site is in /html/sc5 and the view is in /html/sc5/view) Your method DOES work, the only problem is that the first regex (or second, order doesnt matter it seems with lighttpd) overrides your regex.
  13. I changed that but I dont think that is my problem. Its that everything in /sc5/ folder is being included into index.php, even the dirs (sc5/view/)
  14. Good idea, but I just tried this way and it doesn't seem to make a difference.
  15. Hello, I seem to having an issue figuring out the right mix of regex here. ---------------------------------------------first-------------------------------------------------------second----------------------------------------------- url.rewrite-once = ( "^/sc5/([^.?]*)$" => "/sc5/index.php?go=$1", "^/sc5/view/(.*)" => "/sc5/view/index.php?i=$1" ) The first mod_rewrite makes my url clean by changing example.com/?go=test to example.com/test The second mod_rewrite (IS SUPPOSED) to make the same thing happen, but in another directory. So my question is: How do I rewrite the first regex to ignore folders or slashes? As I believe this is the root of the problem.
  16. Oh wow, very nice. I was over thinking the situation with a regex implementation. Cheers.
  17. Hello, I am using lighttpd as my webserver and all ".htaccess" has to be written in the lighttpd.conf Basically I am using regex to clean my URLs. "^/sc5/([^.?]*)$" => "/sc5/index.php?go=$1" The above includes any file into the main index layout. so, example.com/test <- (cleaned) would include test.php into index.php as index.php?go=test <- (uncleaned). My problem is that on my index.php page I redirect anyone without an active SESSION to login.php, but my regex is automatically including it into index.php, and it has a redirect loop. So my question is: How do I exclude (in regex) anything that matches example.com/login.php Thanks in advance!
  18. Hello people of PHPFreaks. I am trying to calculate win percents that are 1% in my favor (house edge). Here are the variables: Game Type (1 = over, 0 = under) Game Number:(49.50) (game type 1 to win if your roll is OVER 49.50 :::::: game type 0 to win if your roll is UNDER 50.50) Multiplier: Any number between 1 and 9900 Preview of panel: (www.dice.sx for live example) What I am trying to calculate is the chance with a 1% house edge. How do I go by this? Here is what I have so far (which doesnt really work) <?php $type = 1; $game_int = 50; $roll = 70; $bet = 100; //Get payout if($type == 1){ $chance = (100 - $game_int); $multiplier = round((100 / $chance), 5); if($roll > $game_int){ $result = 1; $payout = round($bet * $multiplier, 5); echo "Type: $type - Payout: $payout - Chance: $chance - Multiplier: $multiplier - Game: $game_int - Bet: $bet"; } else { $result = 0; $payout = round($bet, 5); echo "Lose: $bet"; } } else { $chance = $game_int; $multiplier = (100 / $chance); if($roll < $game_int){ $result = 1; $payout = round($bet * $multiplier, 5); echo "Type: $type - Payout: $payout - Chance: $chance - Multiplier: $multipler - Game: $game_int - Bet: $bet"; } else { $result = 0; $payout = round($bet, 5); echo "Lose: $bet"; } } ?>
  19. Hello guys! What I am trying to do is make a random keypad where every time you load the page, a random keypad (1,3,2,4) (page reload) (2,1,4,3) (page reload) (1,2,3,4). It needs to randomly and uniquely generate a pin, only using 1 one number each time. BAD: (3,3,2,1) GOOD: (3,2,1,4) Any idea how to do this?
  20. Yep. It's official. I'm an idiot. replace $new with $html, and boom it works.
  21. I am drawing a blank or either thinking too hard here. I am trying to replace each item. I have the pastebin_id that matches in mysql database. (Mysql part is all correct, is the replace script that doesnt completely work.) It seems to be only showing one item replaced. pages/1.txt: <ul id="filters"> <li><a href="/tumblr-themes">Themes</a> /</li> <li><a href="/one-column-tumblr-themes">One Column</a> /</li> <li><a href="/two-columns-tumblr-themes">Two Columns</a> /</li> <li><a href="/three-columns-tumblr-themes">Three Columns</a> /</li> <li><a href="/four-columns-tumblr-themes">Four Columns</a> /</li> <li class="last"><a href="/theme-help">Theme Help</a></li> </ul> <ul class="clearfix isotope" id="portfolio-items"> <li class="one isotope-item"><a href="http://tit-133.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/uiqhh9x/EyWm90u45/tit-133.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/HCaMRShp" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-132.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/uiqhh9x/oUcm90u1t/tit-132.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/Y8cDqc5h" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-114.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/uiqhh9x/0PMm8s6th/tit-114.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/yTYYHLkJ" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-105.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/Tv4m8767q/tit-105.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/ZY9hzx34" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-101.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/gqym87667/tit-101.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/YdrPvDdF" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-91.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/DvQm6m4uk/tit-91.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/b9MJpiUa" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-90.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/Re5m6m4ud/tit-90.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/a9QC9aJ5" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-83.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/94gm6m4u6/tit-83.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/kjeFYMrq" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-80.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/QSsm6m4u2/tit-80.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/CmKgnenP" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-79.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/cvQm6m4tx/tit-79.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/Nv2g2L51" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-72.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/5JFm6m4sx/tit-72.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/xKCyPBwt" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-67.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/G1cm6m4sr/tit-67.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/DafcTRFD" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-61.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/DS1m6m4sm/tit-61.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/YMBjUFBM" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-58.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/z3rm6m4sf/tit-58.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/KwA482F5" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-57.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/yZ3m6m4sc/tit-57.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/STNvtktU" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-56.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/9Ckm6m4s6/tit-56.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/WKuG3Rr5" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-54.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/4pgm6m4s0/tit-54.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/w5tFXywz" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-53.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/qp1m6m4qp/tit-53.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/DjJ59aUr" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-47.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/FmUm6m4qk/tit-47.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/Fk81rqge" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-46.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/xN1m6m4qg/tit-46.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/2J0Gwuv8" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-37.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/4p4m6m4qd/tit-37.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/n8MqTnci" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-36.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/jF1m6m4qa/tit-36.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/EhhLbEUk" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-34.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/Vn8m6m4q6/tit-34.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/Y4LnHEZH" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-31.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/MbBm6m4q3/tit-31.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/KbUrYjz8" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-30.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/r6Lm6m4oo/tit-30.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/j4jvCeAe" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-28.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/hC6m6m4ok/tit-28.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/drXrpCV2" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-27.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/epOm6m4oe/tit-27.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/J4LfrRra" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-26.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/wOum6m4ob/tit-26.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/KEprw3WX" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-22.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/0ezm6m4o6/tit-22.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/eF3zGm6E" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-21.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/tQDm6m4o1/tit-21.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/PquYJLkq" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-20.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/VBPm6m4nw/tit-20.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/mGfpanes" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-15.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/uTYm6m4lm/tit-15.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/rHMrgKK8" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-13.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/pCYm6m4lh/tit-13.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/2vNJic53" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-9.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/X0rm6m4lf/tit-9.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/26r4gUST" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-7.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/dSzm6m4l9/tit-7.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/ULwYt9ZT" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-5.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/fGxm6m4l6/tit-5.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/yWzxth4W" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-4.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/0yom6m4l2/tit-4.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/agU7Vqca" target="_blank">click here for theme code</a> </span></li> <li class="one isotope-item"><a href="http://tit-1.tumblr.com" target="_blank"> <img alt="" height="187" src="http://static.tumblr.com/tpqedpr/0cxm6m4kl/tit-1.png" width="280" /></a> <span class="title"> <a href="http://pastebin.com/gjd9QQHx" target="_blank">click here for theme code</a> </span></li> </ul> <div class="pagination"><span>1 page of 1</span> <div class="numbers"><a href="#">1</a></div> </div> Replace Script: <?php $columns = 'pages/1.txt'; mysql_connect('localhost', 'root', ''); mysql_select_db('themes'); $html = file_get_contents("$columns"); $sql = mysql_query("SELECT * FROM themes WHERE columns = 'one-column-tumblr-themes'"); while($row = mysql_fetch_assoc($sql)){ $new = str_replace("http://pastebin.com/$row[pastebin_id]", "http://tsil.co/theme?id=$row[name]", $html); } echo $new; ?>
  22. Yeah I guess people uploaded some questionable files. (which have since been removed.)
  23. It seems to be working on iPhone Chrome, and Safari. As well as Andriod.
×
×
  • 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.