Can somone tell me how to mek this script?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • adrianTNT

    Can somone tell me how to mek this script?

    Hello, I am very new to php, I need a script, is probably simple for
    the ones that know a bit of php:

    I need the script to read links from a web page and return them as
    variable names, for example to tell it to read file
    http://www.adriantnt.com and the script returns (by "echo" i suppose)
    variables like:

    l1=http://www.adriantnt.c om/news.html
    l2=http://www.adriantnt.c om/contact.html
    l3=http://www.adriantnt.c om/products.html

    Can somone please tell me how this has to be made ?

    Thank you.
    -Adrian.

  • Tim Van Wassenhove

    #2
    Re: Can somone tell me how to mek this script?

    On 2005-01-20, adrianTNT <adriantnt@adri antnt.com> wrote:[color=blue]
    > Hello, I am very new to php, I need a script, is probably simple for
    > the ones that know a bit of php:
    >
    > I need the script to read links from a web page and return them as
    > variable names, for example to tell it to read file
    > http://www.adriantnt.com and the script returns (by "echo" i suppose)
    > variables like:
    >
    > l1=http://www.adriantnt.c om/news.html
    > l2=http://www.adriantnt.c om/contact.html
    > l3=http://www.adriantnt.c om/products.html
    >
    > Can somone please tell me how this has to be made ?[/color]


    So you got to lookup
    - get file contents -> http://www.php.net/file_get_contents
    - find all the a tags -> http://www.php.net/preg_match
    - output the found href -> http://www.php.net/echo


    --
    Met vriendelijke groeten,
    Tim Van Wassenhove <http://www.timvw.info>

    Comment

    Working...