Re: [PHP] web page grab
The eregi_replace syntax would be: $string = eregi_replace(.*Wish(.+)numbers, \\1, $page); It should be noted that I prefer preg_replace, but that's neither here nor there. That _should_ work. It looks fine to me, but test it out to make sure. -- Plutarck Should be working on something... ...but forgot what it was. Ed Lazor [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi =) I'm trying to grab content from another web page. After having browsed through the mailing list archives and such, it looks like I'll need to use the eregi_replace function, but I'm not sure how to properly format the command. The goal is to get rid of everything from the start of the page up to the word Wish and everything after the word numbers. Or, another way of phrasing it, I'm wanting to get a web page and only use the content between the words Wish and numbers. What would be the best way of going about this? Thanks, -Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] web page grab
In other words ... $grab = eregi("wish(.*)numbers ."); the (.*) is what you're grabbing. You don't need to include the entire file up to 'wish' and beyond 'numbers', just enough to make a unique portion. Mick I'm trying to grab content from another web page. After having browsed through the mailing list archives and such, it looks like I'll need to use the eregi_replace function, but I'm not sure how to properly format the command. The goal is to get rid of everything from the start of the page up to the word "Wish" and everything after the word "numbers". Or, another way of phrasing it, I'm wanting to get a web page and only use the content between the words "Wish" and "numbers". What would be the best way of going about this? Thanks, -Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] web page grab
I thinks you should use eregi_replace (http://www.php.net/manual/en/function.eregi-replace.php) and then strip_tags (http://www.php.net/manual/function.strip-tags.php) to strip HTML tag from string . so, you will get a plain text of the grab page. -- -Tuna- "Ed Lazor" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi =) I'm trying to grab content from another web page. After having browsed through the mailing list archives and such, it looks like I'll need to use the eregi_replace function, but I'm not sure how to properly format the command. The goal is to get rid of everything from the start of the page up to the word "Wish" and everything after the word "numbers". Or, another way of phrasing it, I'm wanting to get a web page and only use the content between the words "Wish" and "numbers". What would be the best way of going about this? Thanks, -Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]