Results 1 to 7 of 7

Thread: How to retrieve file

  1. #1

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459

    How to retrieve file

    Hello!

    i tried to retrieve a file...it all was okay but i failed to get the 3 things out of the file...

    "some text" between the <title>some text</title tags.
    the description of the meta description tag etc. can anyone help me get this information ?

    thanks!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    That's really vague. How are you "retrieving" the file?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459
    hi!

    I am using fopen thing...!

    Thanks!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

  4. #4
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I'm still not following your problem. What is the exact code you're using and what's an example of the input?

    Is it getting all data except the title and meta tags?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  5. #5

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459
    Hi!

    I am getting the full source of th4e webpage...here i am using this particular code to retrieve the source code of the webpage.

    PHP Code:
    <?php
    $handle 
    fopen("http://www.example.com/""rb");
    $contents '';
    while (!
    feof($handle)) {
      
    $contents .= fread($handle8192);
    }
    fclose($handle);
    ?>
    Hope this helps!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

  6. #6
    Fanatic Member TokersBall_CDXX's Avatar
    Join Date
    Mar 2003
    Location
    America
    Posts
    571

    hmm

    I just tested your php code on my website
    and it loads all of the source perfectly

    perhaps you need to check and see if there are meta tags at the file you are trying to load?

    or are you asking how to aquire that info out of the file you loaded?
    Build your own personalized flash based chat room for your webpage for FREE! http://www.4computerheaven.com

  7. #7

    Thread Starter
    Hyperactive Member AvisSoft's Avatar
    Join Date
    Sep 2002
    Location
    Chandigarh
    Posts
    459
    Hi!

    Yes i know that code works...and also the meta tags are also there...i am just unable to seperate them from rest of the code retrieved. Any help would be appericiated.

    Thanks!
    Tapan Bhanot,
    CEO, Avis Software.
    Website: www.avissoftware.com

Posting Permissions

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



Click Here to Expand Forum to Full Width