Ok, here's what I want to do:
1) Open a webpage (it's a .cgi, if that matters)
2) Find a spot in the code and copy the number at that point.
3) Paste the number into the open page.
How would I do that? I found out that I should use ereg_replace() to do so, but how do I open the page, copy a specific spot, and paste that into the open page? Please help.
inserting information from another website using php?
Moderator: General Moderators
-
Garfunkiel
- Forum Newbie
- Posts: 1
- Joined: Wed Mar 16, 2005 4:11 pm
you should try reading this : http://us2.php.net/file
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
file_get_contents() may be a better choice. Also, ereg_* functions are slowish, compared to preg_*. I'd suggest using preg_match() or its sibling preg_match_all()