Käynnissä

PHP file_get_contents help

Hi there,

I'm trying to use file_get_contents to grab the contents of a page and then echo only characters between two parts of the code.

Right now I'm using this:

<?php

$text = file_get_contents("http://www.example.com/whatever.html");

preg_match('/<!-- start -->(.*)<!-- end -->/s', $text, $matches);

$code = $matches[1];

echo $code;

?>

However now I want to do it to a page that doesn't have markers such as <!-- start -->, it only has straight html code.

I need someone to echo the contents between two parts of code such as <form> and </form>

If someone can work out how to do this for me I'll give you $50.

Thanks,

Alex

BTW, I need this done asap!

Taidot: PHP

Näytä lisää: parts now, echo parts, alex t, html help, help using, echo file php, php echo file, html form code help, grab use

About the Employer:
( 12 reviews ) Hamilton, New Zealand

Projektin tunnus: #426962

Myönnetty käyttäjälle:

jexplorer

Please check PMB. jexplorer

30 $ USD 0 päivässä
(154 arvostelua)
6.3

5 freelanceria on tarjonnut keskimäärin 38 $ tähän työhön

ichurakov

Please check PM

30 $ USD 0 päivässä
(215 arvostelua)
6.3
phptools

Hi, You are in BIG trouble

50 $ USD 0 päivässä
(13 arvostelua)
4.7
camMcKinnon

Please check PMB... I think you'll like what you see :)

30 $ USD 0 päivässä
(7 arvostelua)
3.3
allwebexpert

Hello, This is web experts community. We provide excellent programmer and 100% error free code. Thanks Prospective Web Experts

50 $ USD 1 päivässä
(0 arvostelua)
0.0