Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. Your check for the bad word just echoes die or proceed, you would have to place an exit and header redirect, die or w/e if want to actually stop them from using it.
  2. I think this should work, just replaced the one line and used your facetimeid value <?php require ('settings.php'); require('functions.php'); session_start(); if ($_GET['do']=='start') { if ($_POST['facetimeid']=='') { header("Location:".SITE_BASE); } else { include('init.php'); } } elseif ($_GET['do']=='random') { // Make sure we have a session, otherwise redirect to homepage if ($_SESSION['CurrentUser']=='') { header("Location:".SITE_BASE); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="tr-TR"> <head> <title>Facekandi for iPhone</title> <base href="<?php print SITE_BASE; ?>/" /> <meta name="keywords" content="facekandi, livecam, webcam, facelette, facetime chat, iphone 4g, facetime, itouch 4g, face chatroom, video chat, world video chat, "> <meta name="description" content="Facekandi is an iPhone and iPad application designed for randomly pairing you with people all over the world. Try it today to chat, engage and have fun in all kinds of ways. "> <link rel="stylesheet" type="text/css" href="style.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width" /> <link href="http://facekandi.com/iphone/favicon.ico" rel="icon" type="image/x-icon" /> </head> <body> <img src="facekandi.png" alt="" width="265" height="39" /> <?php if ($_GET['do']=='start') { $ruser = getRandomUser($_POST['facetimeid']); $ruser=$ruser['UserFacetimeID']; ?> <div class="content"> Great! You can now start a Facetime session with <a href="external://facetime://<?php echo $ruser; ?>"><?php echo $ruser; ?></a>! <br/> <form action="index.php?do=random" method="post" /><input type="image" src="next.png" class="usersubmit" /><p> </p> <p><font color="#C0C0C0">Go social facekandi crazy..</font></p><!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> </div> <script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script> <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=facelette"></script> <!-- AddThis Button END --> <p> </p> </form> </div> <?php } elseif ($_GET['do']=='random') { $ruser = getRandomUser($_SESSION['CurrentUser']); $ruser=$ruser['UserFacetimeID']; ?> <div class="content"> Here&#39;s a random Facekandi user for you: <a href="external://facetime://<?php echo $ruser; ?>"><?php echo $ruser; ?></a> <br/> <form action="index.php?do=random" method="post" /><input type="image" src="next.png" class="usersubmit" /><p> </p> <p><font color="#C0C0C0" size="3">Share Facekandi with everyone..</font></p> <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> </div> <script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script> <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4d8a80540dedf0f0"></script> <!-- AddThis Button END --> <p> </p> <p> </p> <p align="center"></p> <p align="center"> <!--Insert your Adsense code --> <!--Adsense code end--></font></a></p> </form> </div> <?php $badwords = array( 'monkey', 'banana', 'justin bieber', 'barbara streisant' ); $pattern = implode("|",$badwords); if(isset($_POST['submit'])&& !empty($_POST['facetimeid'])){ if(preg_match("/\($pattern\)/i", trim($_POST['facetimeid']))){ echo 'die!'; }else{ echo 'proceed'; } }else{ echo 'fill in some stuff'; } ?> <?php } else { ?> <form action="" method="post"> <input type="text" value="" name="facetimeid" class="userinput" /> <input type="submit" name="submit" value="submit" /></form> <br /> <br /> <p align="left" class="smallprint"><font color="#0066FF">*</font>Your Facetime ID is either your <b> iPhone mobile number</b> or <b>email address</b> you use for Facetime.<br /> <br/> </p> <p align="left" class="smallprint"><font color="#FF3E3E" size="1">Once you exit the Facekandi application your session will terminate from our server</font><br /> <br /> Remember: be safe and most importantly have fun!</p> <p align="left"></p> <?php } ?> </div> <!-- insert your Google Analytics here --> <!-- End of Google Analytics code --> </body> </html>
  3. I just briefly looked at your code and what you are doing. My impression is you want a multiple where clause that you can then do advanced searches on in a few ways. Make a form with different fields and insert that variable into the where clause of where to search, also make an all in the form select so the default can do a search in all fields if nothing was selected. Here's some links to post here I wrote for doing multiple mysql queries with different advanced searches. http://www.phpfreaks.com/forums/index.php?topic=327039.msg1539799#msg1539799 http://www.phpfreaks.com/forums/index.php?topic=319152.msg1504627#msg1504627 http://www.phpfreaks.com/forums/index.php?topic=318909.msg1503154#msg1503154 http://www.phpfreaks.com/forums/index.php?topic=318786.msg1502751#msg1502751 I'm sure there are other posts about searches in my profile. Using LIKE is kinda slow, I'd recommend doing fulltext and making an index on every where or and clause are to be using.
  4. Use similar to this pattern for "exact" instead of the "if contains" in previous code I did. if(preg_match("/\($pattern\)/i", trim($_POST['ename']))){
  5. As for the match of ban words use something like this. <?php $badwords = array( 'monkey', 'banana', 'justin bieber', 'barbara streisant' ); $pattern = implode("|",$badwords); echo "$pattern<br />";//just to see them if(preg_match("/$pattern/i", trim($_POST['ename']))){ echo 'die!'; }else{ echo 'proceed'; } ?> <form action="" method="post"> Name or Email: <input type="text" name="ename" /> <input type="submit" /> </form> As for any includes you got for api's and w/e, nobody can run the same script you are. I did manage to get it connected by excluding some includes, but I had nobody to talk to.
  6. <FORM><INPUT TYPE="BUTTON" VALUE="Back" ONCLICK="history.go(-1)"></FORM>
  7. How about adding a md5 along with the random number in a larger range. A simple example <?php $member = $_POST['member']; if(!isset($_POST['member']) || $member == ''){ echo "Insert a member name"; } else { $rand_number = rand(1111,50000); $merge_code = md5("$member$rand_number"); echo $merge_code; } ?> <html> <body> <form action="" method="post"> Member: <input type="text" name="member" /> <input type="submit" name="Make Code"/> </form> </body> </html>
  8. Although chartdirector is nice, it comes with a price, 750 bucks to be exact. One year on the upgrade. I have always been the type of person to go the free way instead.
  9. Needs some color there. Shrink and refine your header area. Divide all your areas or at least the content from the background, and do a background or borders. Place registration on it's own page. Overview it's own page and go more into detail as well. This sounds like a gimmick type site to me....The #1 Online Marketplace I would place something more of a quick description of the sites about and let them determine if it's number one or not. I once thought about making an ad sharing community site between webmasters but never got around to it.
  10. Here's one thing I noticed. If you go and watch a video, then try to view the menu, the slide out menu's are under the video. Maybe can make the dropdowns slide out within the main menu. This video was pretty cool btw. http://bayarearcsociety.com/index.php?page=video_amazing3d
  11. I got a wordpress within a subdirectory and this is how I handled it in htaccess # BEGIN WordPress <IfModule mod_rewrite.c> RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wordpress/index.php [L] </IfModule> # END WordPress
  12. Just wanted to add something. On any type of user input or values, you should be checking the inserted values, if and only then if they match execute your scripts. Otherwise give them a default script, page to go to or a message. If you follow that above they can type just about anything in the address bar ..but it wouldn't do anything.
  13. To me here is my outlook on them. Post is good for hiding information. Get is good for permanent bookmarking and different options. Session is good for storing temporary information per user and across pages. That's just my short summed up opinion of them.
  14. Yeah something like this <input type="submit" class="bgbtn blue" value="Yes" name="del" /> <input type="submit" class="bgbtn blue" value="No" name="del" /> and an example of the check would be <?php if ($_GET['del'] == "Yes"){ echo "Was Deleted"; } else { echo "Not Deleted"; } ?>
  15. Well I see a few issues. in your form you use the method as GET, but are checking the value of POST If you change this <form action="manage.php?serv=del&id=<?php echo $serverid; ?>&del=true" method="post"> to this <form action="manage.php?serv=del&id=<?php echo $serverid; ?>&del=true" method="get"> Then also is this, if this rule is even needed at all........ if($_POST['ture']) { Should be if($_GET['del'] == "true") { Well try those changes and see what it does.
  16. Then using ajax is the answer. http://www.w3schools.com/Ajax/default.asp
  17. For the second graph example..I would destroy the image at the end or will use lots of memory. Place this on the last line imagedestroy($im);
  18. <form name="input" action="" method="get"> You leave the action empty. Use w/e method you use.
  19. Usually graphs are made in php using the gd library. http://php.net/manual/en/book.image.php Here's a simple code to make a graph using gd http://code.web-max.ca/image_graph.php Here's a perl module which also uses gd. http://search.cpan.org/~mverb/GDGraph-1.43/Graph.pm
  20. Just for the record I have a games site with wordpress that I import games through mochiads. http://dynainternet.com/games/ Over 30,000 games there. Yeah he probably forgot the href link, you could also do the image itself in the href link. echo "<a href='$swf_file_location' target='_blank'><img src='$graphic_file_location' border='0'></a>";
  21. http://www.game68.com/ is a related search site
  22. This work? <?php $conn = mysql_connect("host", "username", "password"); mysql_select_db("games"); $id = $_GET['id']; if (!isset($_GET['id']) || $id == ''){ //echo "No ID inserted"; $id = 12345;//some default value } $sql = "SELECT * FROM games WHERE id='$id' LIMIT 1"; $result = mysql_query($sql, $conn) or die(mysql_error()); $number_of_results = mysql_num_rows($result); while ($result_array = mysql_fetch_array($result, MYSQL_ASSOC)) { $game_id = $result_array['fldID']; $title = $result_array['fldTitle']; $graphic = $result_array['fldIconSmall']; // Example: game1234.png $swf = $result_array['fldSwfSrc']; // Example: game1234.swf $graphic_file_location = 'http://www.blabla.com/games/images/' . $graphic; $swf_file_location = 'http://www.blabla.com/games/' .$swf; echo "<a href='http://www.blabla.com/games.php?id=$game_id'>$title</a>"; echo '<h1>' . $title . '</h1>'; echo '<img src="' . $graphic_file_location . '" width="50" height="50" border="0" />'; echo '<object width="550" height="400">'; echo '<param name="movie" value="' . $swf_file_location . '">'; echo '<embed src="' . $swf_file_location . '" width="550" height="400">'; echo '</embed>'; echo '</object>'; } ?>
  23. Since your GET is game_id and not id, shouldn't it be this? http://www.blabla.com/games.php?game_id=12345
  24. As for limits, I meant content, unless it's there already. I did notice the 5 minute wait.
  25. I think it's a good idea. But I would certainly start making filters for blocking bad stuff, also prevention from mass spamming with posting limits.
×
×
  • 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.