SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Non-Member redhits's Avatar
    Join Date
    May 2004
    Location
    Romania
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems with splitting data/using explode()

    <?

    $url="http://www.atomintersoft.com/products/alive-proxy/proxy-list/?p=1";
    $url=trim($url);
    $site='';
    $handler=fopen($url,"r");
    while(!feof($handler)){
    $site=$site.fgets($handler,1985*11*14);
    }
    fclose($handler);
    $site2=explode('<table>',$site);
    echo count($site2);
    ?>


    Why this is not working? and not spliting all the tables?

  2. #2
    Application Developer shabbirbhimani's Avatar
    Join Date
    Apr 2004
    Location
    India
    Posts
    2,274
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because the only reason I can find is there is nothing know as <table> in the output string but its something like
    <table width=540 border=0 height=97%> so string "<table>" could not be found and is unable to explode with that parameter.

    Thanks
    Shabbir Bhimani


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •