Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 65

mixology
I hate code!
Profile
Posts: 24
Reg: Oct 01, 2011
Merelbeke
240
10/24/13 11:34 AM (12 years ago)

php code says no ...

me again, with another problem .:) http://www.mixology.be/php4apps/phptest.php (refers to http://mixology.be/joomla1.5test/ ) and http://www.mixology.be/php4apps/acodtest.php ( refers to ovl.acod-spoor.be ) should give the same result. But they don't :-( . Both php files can be found on http://www.mixology.be/php4apps/APP.zip . Anyony who sees where I go wrong ?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/24/13 01:09 PM (12 years ago)
looking...
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/24/13 01:20 PM (12 years ago)
Haven't seen that code in a long time! LOL. One URL loads fine. The phptest.php file. The other one shows an ugly error. You mentioned that these should "give the same result" Not sure how this is possible. One file uses content from http://mixology.be/...... the other one loads content from http://ovl.acod-spoor.... The content at these two URL's is not the same. So, the .php your using is using a method called: simplexml_load_file() This is a pretty standard .php method. The method REQUIRES valid XML data. Load http://www.mixology.be/php4apps/acodtest.php in your browser, you'll see some ugly errors reported by .php. Warning: simplexml_load_file() [function.simplexml-load-file]: http://ovl.acod-spoor.be/index.php?format=feed&type=rss:133: parser error : Extra content at the end of the document in /home/mixology/domains/mixology.be/public_html/php4apps/acodtest.php on line 189 This says it all. The simplexml_load_file() call can't load the content because it's not valid XML. XML is tricky tricky. Super tricky in some cases. The parser error says it's finding extra content at the end of the document. It's super tough to know what this content is... Load the URL's in your browser. View Source. This source is what the script is loading. It looks like all sorts of HTML mixed with all sorts of RSS type data. Look at the .php script, it's expecting XML / RSS type data :-) Not sure if that helps or not but for sure the issue is with the simplexml_load_file() call on line 189 of acodtest.php
 
mixology
I hate code!
Profile
Posts: 24
Reg: Oct 01, 2011
Merelbeke
240
like
10/27/13 09:02 AM (12 years ago)
problem is solved :) Just reinstalled the copy of the site ... Thanks for reading my Q. ! Yuri - Belgium - Ghent
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.