Activity Stream
48,167 MEMBERS
6624 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 3 of 3
  1.     
    #1
    Member

    Default Each line like different array element

    Have this problem:

    I want to check multiple URLs at the same time. All URLs are inside a mysql table like this:
    Code: 
    megaupload/hsudhusdf
    rapidshare/sdjfsdfsd
    fileserve/dsjofsjdfsfsd
    uploading/asjdasdas as dasd
    Each URL in different lines. So what I want to do is to put each URL in a new array value like this:

    Code: 
    $array[0]=megaupload/hsudhusdf
    $array[1]=rapidshare/sdjfsdfsd
    ...
    Any way to do that?

    Right now i'm not using database, just manually like this:
    Code: 
    $urls=array("url1","url2","url")
    $i=0;
    while ($i< count($urls)) {
    //Check if url works or not
    if($urls[$i]=works)
    echo "<font-colior="green">$urls[0]</font><br>;
    else "<font-colior="red">$urls[0]</font><br>;
    $i++;
    }
    But now I want to create a form (created) and insert into database all links (created) now all links are in database but don't know how to separate them

    Another issue
    Also each piece of code checks if for example megaupload links are working, then another piece of code checks for fileserve links are working... If I put all types of urls at the database, same table, how to separate each file host to pass each piece of code??

    Thanks, when all done want to share with you the result...
    QuiGloriam Reviewed by QuiGloriam on . Each line like different array element Have this problem: I want to check multiple URLs at the same time. All URLs are inside a mysql table like this: megaupload/hsudhusdf rapidshare/sdjfsdfsd fileserve/dsjofsjdfsfsd uploading/asjdasdas as dasd Each URL in different lines. So what I want to do is to put each URL in a new array value like this: Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    tehMoviez.com 0Senes.com GeekFaceGames.com
    first issue:

    PHP Code: 
    <?php
    // Make a MySQL Connection
    $query "SELECT * FROM links"
    $result mysql_query($query) or die(mysql_error());
    $links  = array();
    while(
    $row mysql_fetch_array($result)){
        
    $links[] = $row['link'];
    }
    ?>
    change these values to match your database
    $query = "SELECT * FROM links";
    and
    $links[] = $row['link'];

  4.     
    #3
    Respected Member
    Another issue
    Also each piece of code checks if for example megaupload links are working, then another piece of code checks for fileserve links are working... If I put all types of urls at the database, same table, how to separate each file host to pass each piece of code??
    Are each links a distinct record? If yes than you should add a second field for host name only.
    example would be
    record 1
    field 1 fileserve field 2 www.fileserve.com/files/aididpisdpid

    record 2
    field 1 filesonic field 2 www.filesonic.com/files/xyzeeeda

    This way you can order the select by field 1 keeping hosts together so you can do the checks as a batch (api or curl).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. array problem
    By mastercho in forum vBulletin
    Replies: 3
    Last Post: 30th Mar 2012, 04:50 AM
  2. Array Help
    By Flesh_Into_Gear in forum Web Development Area
    Replies: 0
    Last Post: 15th Mar 2011, 04:43 PM
  3. Slogan for ElemeNT OS ?
    By l0calh0st in forum Webmaster Discussion
    Replies: 17
    Last Post: 23rd Oct 2010, 01:49 PM
  4. [VB.NET 2008] XML Deleting Element
    By dcrew in forum Web Development Area
    Replies: 5
    Last Post: 15th Aug 2010, 07:48 AM
  5. Vb to Smf Element blue skin port
    By shadow.prx in forum Webmaster Resources
    Replies: 2
    Last Post: 30th Jan 2009, 09:05 PM

Tags for this Thread

BE SOCIAL