We help IT Professionals succeed at work.
Get Started

php xml file doesnt display (simplexml_load_file)

javiermorquecho
on
729 Views
Last Modified: 2012-08-14
Hi EE!

I try to read a doubleclick.com process that give a XML response. The problem, in development read the XML and shows me the info, but in production doesnt. I added a file_exist function and show me "no exist"

I attach the code.

Thnx a lot
$ord=rand(1000,100000);
$file = 'http://ad.doubleclick.net/adx/xxx/xxx;dcmt=text/xml;sz=###x###;ord='.$ord;

if (file_exists($file)) {
	echo "exist";
}else{
	echo "no exist";
}

$ads = simplexml_load_file($file);
$small_img = $ads->small_img;

Open in new window

Comment
Watch Question
CERTIFIED EXPERT
Top Expert 2004
Commented:
This problem has been solved!
Unlock 2 Answers and 10 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE