Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.
Daily Diamond

Help with PHP

Status
Not open for further replies.

Zoobar

DNF Addict
Legacy Exclusive Member
Joined
Jul 2, 2002
Messages
2,883
Reaction score
9
I'm trying to parse info from a remote site but my script isn't grabbing everything it should. My script grabs info between certain specific html tags. The script is not picking up the paired tags when they are split on two line.

eg.

<tag>grabs this ok</tag><tag>grabs this ok</tag><t
ag>does not grab this</tag>

Can anyone help me out?

Thanks.
 
Domain Days 2024

tristanperry

Domainer & Web/Software Dev
Legacy Exclusive Member
Joined
Jan 5, 2007
Messages
1,584
Reaction score
6
Hmm... odd. Maybe try removing the line breaks or something? E.g.:

$string = preg_replace("\r\n","",$string);

Not sure if that'd mess up other parts of the string - does the following work?

$string = preg_replace("<t\r\nag>","<tag>",$string);

- seeing as though "\r\n" is a line break, this should be the sort of solution you are looking for.
 
Status
Not open for further replies.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Sedo - it.com Premiums

IT.com

Premium Members

MariaBuy

New Threads

Our Mods' Businesses

UrlPick.com

*the exceptional businesses of our esteemed moderators

Top Bottom