i am currently trying to convert this code:
private static String CutOutXML(string resp)
{
var url = resp.Substring(resp.IndexOf("<div>") + "<div>".Length);
url = url.Substring(0, url.IndexOf("</div>"));
return url;
}
to PHP, but this isn't working:
$startpos = strrpos($correcthtml, '<div>');
$correcthtml = substr($correcthtml, $startpos);
$stoppos = strrpos($correcthtml, '</div>');
$correcthtml = substr($correcthtml, $stoppos);
i am trying to curl a web url from the internet and i only need one xml tag out of it. I am now trying for so long and i dont come behind it how to do this.