hno Posted May 15, 2010 Share Posted May 15, 2010 HI every one I want to retrieve a part of a page and show it to my site . I tried file_get_content but it was forbidden in my host . how can I do so ? thanks Link to comment https://forums.phpfreaks.com/topic/201848-how-to-retrieve-a-part-of-a-page/ Share on other sites More sharing options...
hno Posted May 15, 2010 Author Share Posted May 15, 2010 HI every one I want to retrieve a part of a page and show it to my site . I tried file_get_content but it was forbidden in my host . how can I do so ? thanks please help me , How can I do so ? Link to comment https://forums.phpfreaks.com/topic/201848-how-to-retrieve-a-part-of-a-page/#findComment-1058715 Share on other sites More sharing options...
-Karl- Posted May 15, 2010 Share Posted May 15, 2010 Curl Link to comment https://forums.phpfreaks.com/topic/201848-how-to-retrieve-a-part-of-a-page/#findComment-1058745 Share on other sites More sharing options...
satya61229 Posted May 15, 2010 Share Posted May 15, 2010 yes use curl and use a marker to mark those area. Recently for one ticket I have added a text when accessed with certain parameter. Like I will access that page using /test.php?mypage=1 Then in that case I will add a php code there where I will check that if mypage=1 will be in parameter then I will output {content} .... {/content}. In this case using regex on the content grabbed is easier. I have also added exit after my content so that my page access from the specified page can be faster. Link to comment https://forums.phpfreaks.com/topic/201848-how-to-retrieve-a-part-of-a-page/#findComment-1058750 Share on other sites More sharing options...
hno Posted May 15, 2010 Author Share Posted May 15, 2010 yes use curl and use a marker to mark those area. Recently for one ticket I have added a text when accessed with certain parameter. Like I will access that page using /test.php?mypage=1 Then in that case I will add a php code there where I will check that if mypage=1 will be in parameter then I will output {content} .... {/content}. In this case using regex on the content grabbed is easier. I have also added exit after my content so that my page access from the specified page can be faster. thanks for your help , I tried it but I couldn't use that . Can you give me an example ? thanks for your help Link to comment https://forums.phpfreaks.com/topic/201848-how-to-retrieve-a-part-of-a-page/#findComment-1058780 Share on other sites More sharing options...
hno Posted May 16, 2010 Author Share Posted May 16, 2010 yes use curl and use a marker to mark those area. Recently for one ticket I have added a text when accessed with certain parameter. Like I will access that page using /test.php?mypage=1 Then in that case I will add a php code there where I will check that if mypage=1 will be in parameter then I will output {content} .... {/content}. In this case using regex on the content grabbed is easier. I have also added exit after my content so that my page access from the specified page can be faster. thanks for your help , I tried it but I couldn't use that . Can you give me an example ? thanks for your help can you giving me an example of using curl ? please Link to comment https://forums.phpfreaks.com/topic/201848-how-to-retrieve-a-part-of-a-page/#findComment-1059048 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.