473,569 Members | 2,604 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.

Jul 17 '05 #1
1 1175
On 2005-01-20, adrianTNT <ad*******@adri antnt.com> wrote:
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 ?

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>
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
13057
by: John Lin | last post by:
Howdy, I want to know how to tell if a forked process is done. Actually, my real question is that I want to run a shell script inside of a python script, and after the shell script has finished running, I want to do more stuff *condition* on the fact that the shell script has finished running, inside the same python script. The only...
2
8298
by: Richard Bell | last post by:
Newbie question ... please respond to group I'm trying to open/navigate to a url. How can I tell when the page is fully loaded? Testing suggest that window.open returns before the page is completely loaded and displayed. Likewise, window.navigate. The code looks something like this: wHandle = window.open( url, name, flags ); .... //...
9
9345
by: Ian Richardson | last post by:
If I follow the steps on http://www.dhtmlcentral.com/tutorials/tutorials.asp?id=11 to add .js files to a document on demand, let's say by <body onload="blah();">, how can I reliably tell that it has been loaded? BTW, I'm doing this for several .js files (and I don't always know how many I'll be loading), so I need to check them all. If I...
2
1621
by: Matt | last post by:
How do I tell if java script is running or enabled on the client PC? Please advise.
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.