![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
So Fucking Banned
Industry Role:
Join Date: Oct 2009
Location: The Whitehouse
Posts: 17,349
|
Can I get some xml parser assistance?
Since AFF decided to add these stupid brackets to their xml feed, it broke my scripts.
Living in <![CDATA[Newport Beach]]>, <![CDATA[California]]><br> <![CDATA[United States]]> the damn <!CDATA[ and ]] used to not be there.... since they added it, my geo stuff isnt showing up on my pages because my parser doesnt work now. Anybody know how to fix it? My parser has this: Code:
$g1 = strpos($xml, "<city>", $i); $g2 = strpos($xml, "</city>", $g1); $city = str_replace(array("<city>","</city>"), "", substr($xml, $g1, $g2 - $g1)); |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
So Fucking Banned
Industry Role:
Join Date: Oct 2009
Location: The Whitehouse
Posts: 17,349
|
I fixed it... left the parser alone and stripped the codes out in index.php
Code:
// swap listings into main template $template = str_replace('%listings%', $listings, $template); $template = str_replace('%sendurl%', $sendurl, $template); $template = str_replace('<![CDATA[', '', $template); $template = str_replace(']]>', '', $template); //display page echo $template; } |
![]() |
![]() ![]() ![]() ![]() ![]() |