Grab data from URL
Moderator: General Moderators
-
bladecatcher
- Forum Commoner
- Posts: 67
- Joined: Sat Mar 12, 2005 12:50 am
Grab data from URL
G'day All,
I want to grab data from a public web site parse it and add it to my page (with permission of coarse).
A starting point would be how to grab the page, yes?
Where and what am I looking for?
Thanking you in advance,
bladecatcher
I want to grab data from a public web site parse it and add it to my page (with permission of coarse).
A starting point would be how to grab the page, yes?
Where and what am I looking for?
Thanking you in advance,
bladecatcher
-
bladecatcher
- Forum Commoner
- Posts: 67
- Joined: Sat Mar 12, 2005 12:50 am
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
bladecatcher
- Forum Commoner
- Posts: 67
- Joined: Sat Mar 12, 2005 12:50 am
-
bladecatcher
- Forum Commoner
- Posts: 67
- Joined: Sat Mar 12, 2005 12:50 am
phpinfo says
damn, PHP Version 4.1.2
Thanks for the start though, I'll look at the longer route.
Any alternative suggestions?
Thanks very much guys
btw, I got the version by running a file phpiinfo.php which I found easily through a google search.
Thanks for the start though, I'll look at the longer route.
Any alternative suggestions?
Thanks very much guys
btw, I got the version by running a file phpiinfo.php which I found easily through a google search.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
bladecatcher
- Forum Commoner
- Posts: 67
- Joined: Sat Mar 12, 2005 12:50 am
Thanks All,
so far I've got:
Now I need to search $wpage for a string (mystring) then output the next 3 lines.
I could use strstr on each line however is there a function to find the first occurance of a string in the file?
tia
bladecatcher
so far I've got:
Code: Select all
$wpage = fopen("http://www.site.com.au/cgi-bin/script.pl?ID1.txt", "r");
while(!feof($wpage))
{
$output = fgetss($wpage, 1024);
echo ("$output<br />");
}
fclose($wpage);I could use strstr on each line however is there a function to find the first occurance of a string in the file?
tia
bladecatcher
-
bladecatcher
- Forum Commoner
- Posts: 67
- Joined: Sat Mar 12, 2005 12:50 am
strpos
Thank you very much.