Hey, having trouble with cross-domain XMLHttpRequests?

Status
Not open for further replies.
Messages
2
Reaction score
0
Points
0
This might be disabled on the host by default, I don't know much about hosting, I just write code

But I'm trying to use Zend to get YouTube search results from YouTube.com and I'm being blocked and getting an error. Would you know if there's any way to enable it or fix this issue? Might be some kind of socket issue?

Error below:

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Unable to Connect to tcp://gdata.youtube.com:80. Error #: ' in /home/garo/public_html/UberTube/Zend/Gdata/App.php:688 Stack trace: #0 /home/garo/public_html/UberTube/Zend/Gdata.php(221): Zend_Gdata_App->performHttpRequest('GET', 'http://gdata.yo...', Array, NULL, NULL, NULL) #1 /home/garo/public_html/UberTube/Zend/Gdata/App.php(875): Zend_Gdata->performHttpRequest('GET', 'http://gdata.yo...', Array) #2 /home/garo/public_html/UberTube/Zend/Gdata/App.php(763): Zend_Gdata_App->get('http://gdata.yo...', NULL) #3 /home/garo/public_html/UberTube/Zend/Gdata/App.php(205): Zend_Gdata_App->importUrl('http://gdata.yo...', 'Zend_Gdata_YouT...', NULL) #4 /home/garo/public_html/UberTube/Zend/Gdata.php(162): Zend_Gdata_App->getFeed('http://gdata.yo...', 'Zend_Gdata_YouT...') #5 /home/garo/public_html/UberTube/Zend/Gdata/YouTube.php(263): Zend_Gdata->getFeed('http://gdata.yo...', 'Zend_Gdata_YouT...') #6 /home/garo/public_html/UberTube/searchYT.php(117): Zend_Gd in /home/garo/public_html/UberTube/Zend/Gdata/App.php on line 688
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
1. clarification: cross-domain XMLHttpRequest = javascript, your error = PHP. They are completely different things, so using the wrong terminology may prevent you from finding the answer you need
2. we do not block outgoing requests anymore, which means that it's likely an issue either with your script or youtube blocking our server IP
3. make sure that everything you are doing with YouTube both follows their terms of service and ours to avoid getting your account suspended
 
Messages
2
Reaction score
0
Points
0
Yes it's a PHP issue, not an XMLHttpRequest object from JavaScript, sorry.

But I've tried this on 4 different hosting services, and had various problems on every one. x10hosting is my favorite so far, because it allows SSI and DocumentRoot to be easily used, and 100% of my code can be used directly copied over.

But the capability functions directly as I want on the other hosts (which have other problems, like fopen or DocumentRoot disabled).

This is a Zend script, so I don't think it's a mistake on their part, and seeing as my code works on so many other hosts, I don't understand why it's being blocked.

Maybe some sort of tcp blocking... Or YouTube hates your IP for some reason. Can anyone else help me out
 
Status
Not open for further replies.
Top