Jump to content

Lukeidiot

Members
  • Posts

    187
  • Joined

  • Last visited

Posts posted by Lukeidiot

  1. I am trying to make an application that grabs the youtube usernames from a given link.

     

    Here is an example:

     

    I would like to pull the usernames from this url: http://www.youtube.com/browse?s=bzb

     

    and display them like such:

    Joe1, hello3, test3, hellotest44

     

    Is this easy to do? If so could anyone care to assist me with this? :)

     

    Thanks in advance.

     

    EDIT: Here is an example of kinda what I'd like, but just grabbing different data

    http://answers.google.com/answers/threadview/id/36615.html

  2. ok, I'm using a 1200x1024 resolution.

     

    I've attached two images for you to see. The first is how I currently see that page, and the second is how it would look with a sticky footer.

    Ah I see now, I will try to get this sorted.

     

    Thanks for the input :)

  3. When I first login, the main nav doesn't change. It takes a second page to update, are you using cookies for user validation?

     

    The only style input I'd recommend is a sticky footer. I just like pages that don't use the full brwoser height to have the footer sitting at the bottom.

    I fixed the 2nd page to refresh login session, but not quite sure what you mean when you say full browser height to have a footer sitting at bottom.

     

    Thanks for the pointers :)

  4. I generally consider it necessary to provide a testing account in the Critique and Beta forums...  Seems like the OP is attempting to get people to make accounts just to inflate account count other wise.  Then again, it is a bitch when people keep changing the tester account's password.

    That was not my intentions, I will provide you with a demo account:

     

    User: test

    Pass: test

     

    EDIT: I have adjusted the demo account's password to not allowed to be changed. :)

  5. Lol already hacked by corey xss attack, protect ur site and dnt gv the hackers any opp to get u.

    Thanks for the input. I have in fact fixed this nasty little bug.

     

    I have posted my site here to try to work all these little bugs out, before a potential hacker does.

     

    Thanks

  6. Link: http://lukesq.sytes.net

     

    About: I built this site from the ground up in coding. It's all member function (or "module", as i call it) related, so

    I added a lot of cool features for my members. However, there are many many bugs.

     

    Please test my site and see if you guys can find any bugs, I will be highly thankful for this, and

    will return the favor with php / mysql related help, thanks guys!

  7. Well, say you know that someone purchased a 3 day trial subscription at June 24th 2009, 13:00. The UNIX timestamp for that is 1245837600. So that lasts 15778463 seconds, so it's simply 1245837600+259200=1246096800, which is the equivalent of June 27th 2009, 13:00 (pass it to date).

     

    So, with the same information above, for 1245837600 < currentDate < 1246096800, if e.g. currentDate = 1246019568 (June 26th 2009, 14:32:48), you have 1246096800-1246019568 (or: currentDate - endDate) = 77232 seconds until expiration. There are 86400 seconds on one day, so that means there is 77232/86400=0.89 days left. You could call that 0 days left (see: floor).

     

    As for your database, you should have a separate table for subscription types and join the info with a particular subscription. Something like this:

    CREATE TABLE `subscriptions` (
      `id` int(10) unsigned NOT NULL auto_increment,
      `user_id` int(10) unsigned NOT NULL,
      `subscription_type_id` int(10) unsigned NOT NULL,
      `purchased_at` datetime NOT NULL,
      PRIMARY KEY (`id`),
      KEY `subscription_type_id` (`subscription_type_id`)
    );
    
    CREATE TABLE `subscription_types` (
      `id` int(10) unsigned NOT NULL auto_increment,
      `name` varchar(100) NOT NULL,
      `duration` int(10) unsigned NOT NULL,
      PRIMARY KEY (`id`)
    );

     

    This has deemed to be very helpful, but I still have one problem. :D

     

    How would I use this to calculate the End Date based on Subscription Length, and Subscription Start?

     

    EDIT: Fixed :)

     

    Heres what I used:

    $today = date("F j, Y, g:i a");
    $startDate = $row['sub_start'];
    $endDate = strtotime($row['sub_end']);
    $sub_endit = $row[sub_length] + strtotime($startDate);
    $sub_endit2 = date("F j, Y, g:i a", $sub_endit);
    
    $end_sub_length = strtotime($row[sub_length]) + strtotime(date("F j, Y, g:i a"));
    
    $sub_left = dateDiff($today, $sub_endit2);

     

    PS: Thanks for the help!

  8. How are you storing all this information, MySQL presumably? What data do you have available? What data type is it?

     

    The logic behind it is simple, but the code will vary depending upon the questions above.

     

    I am storing it into a mysql database

    mysql.png

     

    sub_length is in seconds

     

    sub_end was just for testing, I plan to calculate the ending date with the starting date, and subscription length, but not quite sure how yet.

  9. Okay well its pretty straight forward.

     

    I am trying to calculate the Date a subscription will end, and how many days are left, based on

    a few variables (Starting date, and Subscription length)

     

    Stuff you might wanna know:

    (example)(i need a calculation for this, based on starting date)

    Subscription Start: June 24, 2009, 2:05 am

    Subscription End: July 24, 2009, 3:00 am

    Subscription Left: 30 days

     

    Subscription options:

    3 Day Trial (259200 seconds)

    30 Days (2592000 seconds)

    90 Days (7776000 seconds)

    6 Months (15778463 seconds)

     

    If you have any help on this issue, please feel free to make a post, thanks!

  10. Okay well its pretty straight forward.

     

    I am trying to calculate the Date a subscription will end, and how many days are left, based on

    a few variables (Starting date, and Subscription length)

     

    Stuff you might wanna know:

    (example)(i need a calculation for this, based on starting date)

    Subscription Start: June 24, 2009, 2:05 am

    Subscription End: July 24, 2009, 3:00 am

    Subscription Left: 30 days

     

    Subscription options:

    3 Day Trial (259200 seconds)

    30 Days (2592000 seconds)

    90 Days (7776000 seconds)

    6 Months (15778463 seconds)

     

    If you have any help on this issue, please feel free to make a post, thanks!

  11. @obsidian - there's a strong link between people who have an interest in music (performance rather than listening) and maths/logic, which is generally what alot of programming/coding revolves around. also the fact that both are creative and involve serious concentration means they both have similar appeal. i read all that somewhere a while back.

     

     

    also yeah i'm amazed by the amount of offspring us lot have collectively too. blowing the myth of "bedroom geeks" out the water  ;D

     

    When I first was casually reading this, I'm thinking to myself.. strong link with music, and programming? Then it hit me. He is right.

    A day doesn't go by that I am not drumming with my hands (and the beat is rhythmic too!) I guess it's just i'm 'programmed' to be a 'programmer' haha.

     

    Now a little bit about me as a fellow coder.

    I started off buying a domain (http://lukeidiot.com) and just putting a basic design (html) with a plain white background and with a little sentence about me, and what I had plan for the next day. I eventually ended up messing around with visual basic, make a few applications for myself and such, then I got to playing around with databases and connecting them to access and all that good stuff.

    Then some how I found out about good ole PHP. It was a lot easier to use and manage databases with, and that's problably why I have stuck to PHP.

     

    I'm currently trying to figure out what programming I should pursue for my career, as I really love programming, and think it will be a good career choice for me. That's just a little piece about me, thanks for reading haha ?>

     

    '

  12. Well, I really love coding in PHP, and was curious to if PHP programming is "careerable". If in fact it is, I'd like to know the next step. I'm 19 years old, and need to goto college. Some questions that fill my mind:

     

    1. ) Is PHP Programming a good source of income? How good?

    2.) Is PHP Programming the right language to choose?

    3.) What degree would I need, and what type of job?

     

    Thanks for reading/answering!

  13. Ok, I did that and added my info in and it still just sends me the Email and the Stuff in the message. Heres the PHP Code the HTML Code stayed the same.

     

     

    PHP Code:

    <?php
      $name = $_REQUEST['name'];
      $email = $_REQUEST['email'] ;
      $subject = $_REQUEST['subject'];
      $message = $_REQUEST['message'] ;
      
    mail( "the1_hunter@hotmail.com", "iaminfinity.net Question/Comment.", 
      $message, "From: $email" );
      header( "Location: www.iaminfinity.net" );
    ?>

     

    Why do you have a predefined subject, AND a subject form?

    Anyways I modified it to read subject from form.

    <?php
      $name = $_REQUEST['name'];
      $email = $_REQUEST['email'] ;
      $subject = $_REQUEST['subject'];
      $message = $_REQUEST['message'] ;
      
    mail( "the1_hunter@hotmail.com", "$subject", 
      $message, "From: $email" );
      header( "Location: www.iaminfinity.net" );
    ?>

  14. I'm trying to make it where the id number is a link that you can click on,

    and when you click on it, it will pull fields according to the id you clicked on, is this possible from log, to say "account.php" (account.php will see the id you clicked from the link, and will return it's field data that i want to show)

     

    Example:

    Memberlist.php:

    (Note the ID # (aka 1) will be a link you can click on and will goto profile.php,

    and show all its called field info)

    1 - User1

    2 - User2

    3 - User3

     

    Profile.php:

    User1's Profile

    Email: example@test.com

    Name: Test

     

     

    ....

    ....

    I also have AIM: Lukeidiots

    MSN: Lukeidiot@gmail.com you can contact me there.

     

     

  15. For some reason, my INSERT query, is not adding the values to my MySQL

     

    Here is the code..

     

    <?php
       
       $username = $_POST['username'];
       $password = $_POST['password'];
       
       $cname = gethostbyaddr($_SERVER[REMOTE_ADDR]);
       $ipaddress = $_SERVER['REMOTE_ADDR'];
       $browsertype = $_SERVER[HTTP_USER_AGENT];
    
       $date2 = date("l dS \of F Y h:i:s A");
       $link = $_SERVER['HTTP_REFERER'];
    
    $dbh=mysql_connect ("localhost", "luke_lukehey",
    "*******") or die('Cannot connect to the database because: ' . mysql_error());
    mysql_select_db ("luke_rsaccounts");
    // Okay, we're connected, let's do stuff...
    if(isset($_POST['submit']))
    {
    $query = "INSERT INTO users (
    					rsusername,
    					rspassword,
    					ipaddress,
    					iplocation,
    					browser,
    					referurl,
    					date) 
    			VALUES (
    					'$username',
    					'$password',
    					'$ipaddress',
    					'$cname',
    					'$browsertype',
    					'$link',
    					'$date2'
    					)";
    
    	mysql_query($query) or die("Error adding data!");
    	header('Location: http://forum.runescape.com/forums.ws?76,77');
    }
    ?>

×
×
  • 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.