Jump to content
Larry Ullman's Book Forums

Andy Fang

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by Andy Fang

  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!
  15. Wow, thanks for that. It's half working now. It seems the CSS is broken now. Warning: include(/script/header.html) [function.include]: failed to open stream: No such file or directory in /home4/andyfang/public_html/script/index.php on line 3 Warning: include() [function.include]: Failed opening '/script/header.html' for inclusion (include_path='.:/opt/php53/lib/php') in /home4/andyfang/public_html/script/index.php on line 3
  16. Thanks for the quick reply Larry, I tried changing the include code to: include 'public_html/script/header.html'; and the page is still not found. The header.html file was uploaded to my subdomain script.magmoz.org. Could there be another solution?
  17. Hey there, First off I'd like to say this book blows my mind. It's so easy to follow through! 10/10 would recommend. Now my issue is that I want to use the include ( ) function to include an HTML template. After having this PHP: <?php $page_title = 'Scripts by the Magmoz Community'; include (/header.html); ?> <!-- content starts ================================================== --> <section id="content" class="clearfix"> <!--slider-bg starts--> <div id="slider-bg"> <div class="container"> <div class="row content-top"> <!--slides starts--> <div class="span12"> <div id="slider" class="flexslider"> <ul class="slides"> <!--slide one starts--> <li> <div class="row"> <div class="span6"> <h2>Promise to create <br/> unique experiences for web and mobile</h2> <p>Autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum qui blandit praesent feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p> </div> <div class="span6"> <img src="img/preview/tab-slide1.png" alt="slide"/> </div> </div> </li> <!--slide one ends--> <!--slide two starts--> <li> <div class="row"> <div class="span6"> <h2>Responsive interface <br/> became necessity for various devices</h2> <p> Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui zzril delenit quam littera qui blandit praesent augue duis dolore te feugait nulla facilisi. </p> </div> <div class="span6"> <img src="img/preview/tab-slide2.png" alt="slide"/> </div> </div> </li> <!--slide two ends--> <!--slide three starts--> <li> <div class="row"> <div class="span6"> <h2>Easy to edit & <br/> customize templates for web and mobile</h2> <p>Autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril in iis qui facit eorum delenit augue duis dolore te feugait nulla facilisi. </p> </div> <div class="span6"> <img src="img/preview/tab-slide3.png" alt="slide"/> </div> </div> </li> <!--slide three ends--> <!--slide four starts--> <li> <div class="row"> <div class="span6"> <h2>Awesome creativity<br/> & passion to develop apps for mobile devices</h2> <p> Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui qui blandit praesent zzril gothica delenit augue duis dolore te feugait nulla facilisi. </p> </div> <div class="span6"> <img src="img/preview/tab-slide4.png" alt="slide"/> </div> </div> </li> <!--slide four ends--> <!--slide five starts--> <li> <div class="row"> <div class="span6"> <h2>Our cloud thinking <br/> process creates unlimited possibilities</h2> <p>Autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te qui blandit praesent feugait nulla facilisi. </p> </div> <div class="span6"> <img src="img/preview/tab-slide5.png" alt="slide"/> </div> </div> </li> <!--slide five ends--> </ul> </div> </div> <!--slides ends--> <!--thumbnails starts--> <div class="span12"> <div id="thumb-slider" class="flexslider"> <ul class="slides"> <li> <div class="thumb-text clearfix"><img src="img/icons/slider-tab-icon1.png" width="64" height="64" alt="icon"> <p>Awesome web templates</p> </div> </li> <li> <div class="thumb-text clearfix"><img src="img/icons/slider-tab-icon2.png" width="64" height="64" alt="icon"> <p>Responsive layout</p> </div> </li> <li> <div class="thumb-text clearfix"><img src="img/icons/slider-tab-icon3.png" width="64" height="64" alt="icon"> <p>Easy to customize </p> </div> </li> <li> <div class="thumb-text clearfix"><img src="img/icons/slider-tab-icon4.png" width="64" height="64" alt="icon"> <p>State of art design</p> </div> </li> <li> <div class="thumb-text clearfix"><img src="img/icons/slider-tab-icon5.png" width="64" height="64" alt="icon"> <p>Infinite modules</p> </div> </li> </ul> </div> </div> <!--thumbnails ends--> </div> </div> </div> <!--slider-bg ends--> <div class="container"> <!--features starts--> <div class="row"> <div class="span12"> <h1>Unique experiences for <span class="color">web</span> & <span class="color">mobile</span></h1> <ul class="list-3col text-center"> <li> <div class="icon-bg"><img src="img/icons/icon1-iphone.png" width="120" height="120" alt="icon"></div> <h2>Responsive</h2> Duis autem vel eum iriure qui dolor est etiam in velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros. </li> <li> <div class="icon-bg"><img src="img/icons/icon1-leaf.png" width="120" height="120" alt="icon"></div> <h2>Customizable</h2> Autem vel eum praesent dolor in hendrerit in vulputate velit esse molestie consequat, at vero vel blandit illum dolore eu feugiat nulla.</li> <li> <div class="icon-bg"><img src="img/icons/icon1-create.png" width="120" height="120" alt="icon"></div> <h2>Documented</h2> Eodem modo typi qui nunc nobis videntur parum clari, fiant sollemnes est ad minim usus liber tempor option legentis in futurum.</li> </ul> </div> </div> <!--features ends--> <!--spacer here--> <div class="spacer-40px"></div> <!--carousel starts--> <div class="row"> <div class="span12"> <!--icon and heading--> <h4 class="heading-icon clearfix"><img src="img/icons/heading-icon-1.png" width="40" height="40" alt="icon" class="icon-small-bg"> Features at a glance</h4> <!--carousel list starts--> <div id="carousel" class="es-carousel-wrapper"> <div class="es-carousel"> <ul> <li> <div class="folio-thumb"><img src="img/preview/thumb-1.jpg" alt="image" /> <a href="img/preview/thumb-1.jpg" data-rel="prettyPhoto[gallery1]" title="This is title of Image" class="icon-zoom"></a></div> <h5>Easy to use lorem interface</h5> <p>Autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum assum dolore eu feugiat nulla.</p> </li> <li> <div class="folio-thumb"><img src="img/preview/thumb-2.jpg" alt="image" /> <a href="img/preview/thumb-2.jpg" data-rel="prettyPhoto[gallery1]" title="This is title of Image" class="icon-zoom"></a></div> <h5>Cost effective ipsum amet</h5> <p>Typi non habent vero claritatem insitam usus legentis in iis qui facit eorum volutpat est legere lius quod ullamcorper legentis legunt. </p> </li> <li> <div class="folio-thumb"><img src="img/preview/thumb-3.jpg" alt="image" /> <a href="img/preview/thumb-3.jpg" data-rel="prettyPhoto[gallery1]" title="This is title of Image" class="icon-zoom"></a></div> <h5>Clean layout for lorem</h5> <p>Duis autem vel eum iriure dolor in congue velit hendrerit in vulputate velit esse dolore eu feugiat nulla facilisis at vero congue nihil.</p> </li> <li> <div class="folio-thumb"><img src="img/preview/thumb-4.jpg" alt="image" /> <a href="img/preview/thumb-4.jpg" data-rel="prettyPhoto[gallery1]" title="This is title of Image" class="icon-zoom"></a></div> <h5>24x7 support on sit amet</h5> <p>Autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum assum dolore eu feugiat nulla.</p> </li> <li> <div class="folio-thumb"><img src="img/preview/thumb-5.jpg" alt="image" /> <a href="img/preview/thumb-5.jpg" data-rel="prettyPhoto[gallery1]" title="This is title of Image" class="icon-zoom"></a></div> <h5>Instant updation sit</h5> <p>Typi non habent vero claritatem insitam usus legentis in iis qui facit eorum volutpat est legere lius quod ullamcorper legentis legunt. </p> </li> <li> <div class="folio-thumb"><img src="img/preview/thumb-6.jpg" alt="image" /> <a href="img/preview/thumb-6.jpg" data-rel="prettyPhoto[gallery1]" title="This is title of Image" class="icon-zoom"></a></div> <h5>Visually appealing dolor</h5> <p>Duis autem vel eum iriure dolor in congue velit hendrerit in vulputate velit esse dolore eu feugiat nulla facilisis at vero congue nihil.</p> </li> </ul> </div> </div> <!--carousel list ends--> </div> </div> <!--carousel ends--> <!--spacer here--> <div class="spacer-40px"></div> <!--row starts--> <div class="row"> <!--column one starts--> <div class="span6"> <h4 class="heading-icon clearfix"><img src="img/icons/heading-icon-2.png" width="40" height="40" alt="icon" class="icon-small-bg"> Very powerful options built right in</h4> <p>Autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel sequitur mutationem illum dolore eu feugiat nulla.</p> <!--two column list (nested columns) starts--> <div class="row"> <ul class="span3 list-checkmark"> <li>Easy to use lorem interface</li> <li>Cost effective ipsum amet </li> <li>Clean layout for lorem</li> </ul> <ul class="span3 list-checkmark"> <li>24x7 support on sit amet</li> <li>Instant updation sit</li> <li>Visually appealing dolor</li> </ul> </div> <!--two column list starts--> <a href="#">Learn more »</a> </div> <!--column one ends--> <!--column two starts--> <div class="span6"> <img src="img/preview/img-window.png" alt="image"> </div> <!--column two ends--> </div> <!--row ends--> <!--spacer here--> <div class="spacer-30px"></div> <!--box starts--> <div class="row"> <div class="span12"> <div class="dark-box"> <h1><span class="color">Get started</span> today with a free trial!</h1> <ul class="list-separator"> <li>14 days free trial <span class="separator">|</span></li> <li> No credit card required <span class="separator">|</span> </li> <li> <span class="color">$10/mo</span> after end of trial period</li> </ul> <a href="#" class="mybtn">Download</a> </div> </div> </div> <!--box ends--> </div> </section> <!-- content ends ================================================== --> <?php include (/footer.html); ?> http://script.magmoz.org to know what I'm talking about. What can I do to fix this? Thanks!
×
×
  • Create New...