Connecting Tech Pros Worldwide Help | Site Map

Can somone tell me how to mek this script?

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 10:49 AM
adrianTNT
Guest
 
Posts: n/a
Default 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.com/news.html
l2=http://www.adriantnt.com/contact.html
l3=http://www.adriantnt.com/products.html

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

Thank you.
-Adrian.


  #2  
Old July 17th, 2005, 10:49 AM
Tim Van Wassenhove
Guest
 
Posts: n/a
Default Re: Can somone tell me how to mek this script?

On 2005-01-20, adrianTNT <adriantnt@adriantnt.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.com/news.html
> l2=http://www.adriantnt.com/contact.html
> l3=http://www.adriantnt.com/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>
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.