Jump to content
Larry Ullman's Book Forums

Andy Fang

Members
  • Posts

    19
  • Joined

  • Last visited

Andy Fang's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. The problem is I don't know how to automatically assign the username:password an array and mail them in a rotating order (first time is the first line, second time mails second line, etc.
  2. I basically have a .txt file kind of like this: username:password username1:password1 username2:password2 I want to make it so that everytime a button is clicked, one username and password will be emailed from the file. How do I do this?
  3. Alright, I changed the code to this: <p/> <p/> <p/> <p/> <p/> <?php $membersf = array('andy80','affiliatescraper','BHWbots','AWMarketBot','Jennifer50','seomaster','botwork','promo_guy'); $membersf1 = array('seoworld1','Illuminous','socialmediadude','fiverrnuker','botmarket','automationallday'); $membersf2 = array ('tonial','WillR','Tony Cheng','theSE0','SEOnukeX','Domination King','Nochloss5331','martino1','jasonj','torzilla','vpnnpv'); ?> <div class="footer"> <div class="footer_resize"> <table><tr><th>Members Active within Last 30 Minutes (<?php echo mt_rand(11, 35); ?> PRO and <?php echo mt_rand(20, 51); ?> guests)</th></tr></table><table><tr><td><font color="purple"><b>Stev</b></font>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>...</td></tr></table> <br><br> <center> © <?php echo date("Y") ?><a href="http://marketbot.net">MarketBot Niche Finder and Affiliate Marketing Software</a> All Rights Reserved.</a> </center> <br> <div class="clr"></div> </div> <div class="clr"></div> </div> <script> function downloadJSAtOnload() { var element = document.createElement("script"); element.src = "js/full.js"; document.body.appendChild(element); } if (window.addEventListener) window.addEventListener("load", downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload", downloadJSAtOnload); else window.onload = downloadJSAtOnload; </script> <!--[if IE 6]> <script type='text/javascript' src='js/dd_belated_png.js'></script> <script>DD_belatedPNG.fix('.ie6fix');</script> <![endif]--> </body> </html> <body> </html> And am getting this error:
  4. Hey Larry, I quoted the strings in the array like so: <p/> <p/> <p/> <p/> <p/> <?php $membersf = array('andy80','affiliatescraper','BHWbots','AWMarketBot','Jennifer50','seomaster','botwork','promo_guy'); <?php $membersf = array('andy80','affiliatescraper','BHWbots','AWMarketBot','Jennifer50','seomaster','botwork','promo_guy'); ?> <div class="footer"> <div class="footer_resize"> <table><tr><th>Members Active within Last 30 Minutes (<?php echo mt_rand(11, 35); ?> PRO and <?php echo mt_rand(20, 51); ?> guests)</th></tr></table><table><tr><td><font color="purple"><b>Stev</b></font>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>...</td></tr></table> <br><br> <center> © <?php echo date("Y") ?><a href="http://marketbot.net">MarketBot Niche Finder and Affiliate Marketing Software</a> All Rights Reserved.</a> </center> <br> <div class="clr"></div> </div> <div class="clr"></div> </div> <script> function downloadJSAtOnload() { var element = document.createElement("script"); element.src = "js/full.js"; document.body.appendChild(element); } if (window.addEventListener) window.addEventListener("load", downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload", downloadJSAtOnload); else window.onload = downloadJSAtOnload; </script> <!--[if IE 6]> <script type='text/javascript' src='js/dd_belated_png.js'></script> <script>DD_belatedPNG.fix('.ie6fix');</script> <![endif]--> </body> </html> <body> </html> But I'm still getting the error.
  5. Hello Larry, I'm getting this error at my footer.php file here. Basically I try to delete the code happening in line 9, then it says it's happening somewhere else. I delete that part as well, and it says it's happening somewhere else. This is driving me crazy. What do I have to do? I basically want to echo a random string from an array of hundreds of usernames as seen below. I've tried echoing from just $membersf, and it worked just fine. Then when I added a few more strings to the array, suddenly it stopped working. So I split the array up into 3 arrays, and still no luck. What do I do to make this work? <p/> <p/> <p/> <p/> <p/> <?php $membersf = array(andy80,affiliatescraper,BHWbots,AWMarketBot,Jennifer50,seomaster,botwork,promo_guy); $membersf1 = array(seoworld1,Illuminous,socialmediadude,fiverrnuker,botmarket,automationallday); $membersf2 = array (tonial,WillR,Tony Cheng,theSE0,SEOnukeX,Domination King,Nochloss5331,martino1,jasonj,torzilla,vpnnpv); ?> <div class="footer"> <div class="footer_resize"> <table><tr><th>Members Active within Last 30 Minutes (<?php echo mt_rand(11, 35); ?> PRO and <?php echo mt_rand(20, 51); ?> guests)</th></tr></table><table><tr><td><font color="purple"><b>Stev</b></font>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>, <?php echo $membersf[array_rand($membersf)]; ?>...</td></tr></table> <br><br> <center> © <?php echo date("Y") ?><a href="http://marketbot.net">MarketBot Niche Finder and Affiliate Marketing Software</a> All Rights Reserved.</a> </center> <br> <div class="clr"></div> </div> <div class="clr"></div> </div> <script> function downloadJSAtOnload() { var element = document.createElement("script"); element.src = "js/full.js"; document.body.appendChild(element); } if (window.addEventListener) window.addEventListener("load", downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload", downloadJSAtOnload); else window.onload = downloadJSAtOnload; </script> <!--[if IE 6]> <script type='text/javascript' src='js/dd_belated_png.js'></script> <script>DD_belatedPNG.fix('.ie6fix');</script> <![endif]--> </body> </html> <body> </html>
  6. I don't think he does for random numbers. I just want to generate a random number that will stay with that person for that IP/ computer for at least 24 hours.
  7. Hello there, Is there any way I can echo a random, 10 digit number that stays the same per IP address? If that can't be done, how about a cookie that lasts forever or 24 hours? Thanks!
  8. I've tried <?php include ('/header.php'); ?> and it give me: Warning: include() [function.include]: Failed opening '/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a2456912/public_html/leagueoflegends/index.html on line 3
  9. Hello LU, My website is botproducts.net. The problem I'm having is that I want to include the header file located at http://botproducts.net/leagueoflegends/header.php however I get this error: PHP Error Message Warning: include() [function.include]: Failed opening '/leagueoflegends/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a2456912/public_html/leagueoflegends/index.htmlon line 3 and also the code I'm using is include ('leagueoflegends/header.php');
  10. Hey there, How do I create a very simple CMS that basically does the following things: Creates a page as a .php script by accessing the page domain.com/create Creates the page using a notepad++ like editor (with colored syntax) Everytime a page is created, there will be a header include and footer include so you don't have to put HTML tags or specify a CSS every time. Possible to make instant preview? So basically, how do I do this?
  11. There's no documentation for the API. I'm still a little bit confused, could you explain to me in layman terms step by step? I really apologize for this but I have trouble understanding how to store the numbers in a variable.
  12. I'm sorry but I still don't understand. Could you give me an example which does the following: User enters username PHP will automatically search the API for the skill levels for that username How will I reference that number exactly? For instance, the 10th number Thanks!
  13. Hmm, so I'm a little bit confused. With the code you provided me, I placed at the very top of the script. What I want to do is allow users to enter their username and have the script calculate instantly once the user hits enter or clicks elsewhere the text box. I'm not very familiar with the other functions but what variables do I use to define the script? For instance how would I use the Defence Level of a player, with something like: $def = #defence level of player, grabbed from the API. How would I be able to grab let's say, the 10th number separated by commas? Basically I need to know the values of the levels in order to add formulas to them and make a calculator. I'm sure the script knows, but I don't! Thanks!
  14. Hey Larry, I've just started with PHP and have tried learning with a few books (Missing Manual, Dummies, etc) and yours was by far the easiest/ straight forward to understand. That said I would like to practise my PHP skills by starting this project: Basically it's a calculator for a game called RuneScape, and what it will do is calculate the chances of you winning against a match to another opponent, through their skill levels such as Attack, Strength and Defence. The game has their own API that allows you to search any player's skill levels on the High Scores here: http://services.runescape.com/m=hiscore_oldschool/index_lite.ws?player=magmoz (Replace "magmoz" with any player"). Basically I want users to be able to enter their username, hit a button and a variable will store the data. Then enter their opponent's username, hit a button and the variable will store their data. The script will then use both data to calculate the chances of winning. The issue is I don't understand how to grab the data from the API, onto my script. I also hope to calculate the results without reloading the page. An example of this is here: http://www.tip.it/runescape/pages/view/combat_calc.htm (Just type "torzilla" and hit enter or click anywhere on the screen and it will automatically store the data and calculate the results. Change any of the skill levels, and it will calculate it once again). This is a project I am dedicated to learn, please help me with this, it'd be a lifesaver! Thanks!
×
×
  • Create New...