FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Get html code from an extrenal url





gangi
Hi,

I would like to know if its possible to make a php script that downloads the html code of an external page to look for information in its code. For example, lets say I want to check the price of a product on the webpage 1 and compare it with the price of the same product in the webpage 2? Does this server allow this? Because some trial hosting webpages doesn't and i need it to make some tests.

Thanks!!
emanuel2
yes I think "fopen" works, since I use joomla plugins using this command, e.g. new feed reader.
sonam
I don't know for firhost but on last few hosting where I upload sites fefopen() and file_get_contents() functions are disabled for external links.

Sonam
fladry
yes i think the commands are disabled to prevent misuse. I dont think any free host gives you this service. You must obatin some professional hosting to acquire it. You said you will look in two websites for the price of a product. But can you code the script so that it searches in two websites with different html sources for price of a website. I think its a bit hard thing to do. You can just create the data and enter the data manually.
gangi
I try it and it didn't work, I'll try it first local when I have time to install apache on my PC. This way I'm gonna know if its my code or the server.
gangi
It was my code, I try it with file_get_contents( $url); in the server and worked!!
sonam
gangi wrote:
It was my code, I try it with file_get_contents( $url); in the server and worked!!


Lucky you, I was build new site last month and this function is not worked on my hosting (not frihost), and I must change HTTP HOST in DOCUMENT ROOT.

Sonam
Related topics
HTML Tutorials
Speed? Error? Configure your HTML Code Now
IP Address HTML CODE
do you know is it possoible to hide view source menu?
problem with html code for video
BEGINNER NEEDS HELP WITH FINDING A HTML CODE!!!!!!!!!!!!!!!!
let me tell you... this is not an image! it's HTML code!
Need help integrating html code into php
HOW TO LISTEN MP3 AUDIO WITH HTML
How to change extension php to html but the php script still
Earn 100FRIH$ or more!!!
Need Help with this html code
HTML help - Firefox and IE?
need html code tht will randomly change a pic/text plz help
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.