yhi Posted August 23, 2016 Share Posted August 23, 2016 (edited) i want to fetch some data from a file so i am thinking about using file_get_contents i tried it but failed later i found that the website i want to fetch data with.. only show data if we have that website url in our http refer header.... so i want to add a code in my script for sending a fake http refer header with my requestif possible please tell me a way without curl & try to make code as simple as possible thanks Edited August 23, 2016 by yhi Quote Link to comment https://forums.phpfreaks.com/topic/301976-post-request/ Share on other sites More sharing options...
Jacques1 Posted August 23, 2016 Share Posted August 23, 2016 We don't hand out code. If you look at the manual, you'll see that there's a third parameter for a context which can be used to supply additional data. And the HTTP context has a header option for custom HTTP headers. Quote Link to comment https://forums.phpfreaks.com/topic/301976-post-request/#findComment-1536513 Share on other sites More sharing options...
yhi Posted August 24, 2016 Author Share Posted August 24, 2016 thanks that really helped script is working fine Quote Link to comment https://forums.phpfreaks.com/topic/301976-post-request/#findComment-1536560 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.