Membership is FREE, giving all registered users unlimited access to every DNForum feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!
Sedo - Global Domain Report Survey 2025

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.
 

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.

Who has viewed this thread (Total: 1) View details

The Rule #1

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

Members Online

IT.com

Premium Members

Upcoming events

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators

Top Bottom