| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | Quick Help! Parsing So I made a thread a while back on how to parse a certain link. This this the coding I am using. There are 2 sets of code. ________________________________________________ <?php echo file_get_contents('http://www.superbook.com/seo.txt'); ?> _______________________________________________ <?php echo file_get_contents('http://www.sportsbook.com/seo.txt'); ?></ul> _______________________________________________ That is the exact code i'm using. You can go here: http://www.cavsreport.com/blog/ and scroll down on the left column, and under FRIENDS is where I have it pasted. You can see the first link WORKS. While the 2nd link comes back with an error that says: Warning: file_get_contents(http://www.sportsbook.com/seo.txt) [function.file-get-contents]: failed to open stream: HTTP request failed! in /homepages/36/d132896813/htdocs/CavsReport/blog/wp-content/themes/reflections/sidebar.php on line 92 My question is..why is this error there? Why does the first coding work, yet the 2nd one fails and gives an error? It does this on every page I put it on. Is it a problem with the actual ad page, even though they are basically the same? |
| |
| | #3 (permalink) |
| Senior Member | do you have root access on the server? if you do try accessing the page using lynx via ssh. I agree with Bruce's assumption and doing this would confirm if there was a problem. Another possibility is that it is taking too long to load and failling.
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | #4 (permalink) |
| NamePros Regular | Wow, I think you're right. That's for checkin that for me. It did would fine on my other site that isn't on those 1and1 servers. And about root, I can access it using SSh yea. But then what do I do? Is there a way I can fix this personally without contact my 1and1 server people who leave me on hold for 3 hours and then can't speak english? Last edited by combs84; 06-28-2008 at 02:27 PM. |
| |
| | #5 (permalink) |
| Senior Member | providing lynx is installed try:- lynx http://www.sportsbook.com/seo.txt see what response you get.if your ip is blocked there is nothing you can do bar changing your ip. It could also be a dns issue.
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | #6 (permalink) |
| NamePros Member | Very Swiftly, The response is being blocked because they have bot / script detection on the site, to get around this you need to send the HTTP Headers a normal web browser would send. Give this a go, should work for you ![]() PHP Code: |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |