Advertisement
CaptainLepidus

Burst

Mar 21st, 2012
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. $burst=$_GET["burst"];
  2. $bid=0;
  3. $str=$burst;
  4. while(1)
  5. {
  6. $first_at=stripos($str,'@');
  7. if (!$first_at)
  8. {
  9. exit;
  10. }
  11. $first_space=stripos($str,' ',$first_at);
  12. $first_period=stripos($str,'.',$first_at);
  13. $ff=$first_space;
  14. if ($first_period<$ff)
  15. {
  16. $ff=$first_period;
  17. }
  18. $user=substr($str,$first_at+1,$ff-$first_at-1);
  19. $sql="SELECT * FROM users WHERE user=$user";
  20. $result=mysql_query($sql);
  21. if (mysql_num_rows($result)!=0)
  22. {
  23. while($row=mysql_fetch_array($result))
  24. {
  25. $id=$row["id"];
  26. $sql="INSERT INTO burst_user_ref(burst,id) VALUES($bid,$id)";
  27. $result=mysql_query($sql);
  28. }
  29. }
  30. $str=substr_replace($str,'@'.$user,0)
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement