Search the Community
Showing results for tags 'file_get_contents'.
-
Hi, I am trying to grab some data from a site, but my blocker at the moment is that the site has a button near the end of the page, that opens up more data. It's th ebutton that says "Show All" Using file get contents, I don't get this "hidden data". Any ideas please? I'm a novice and am using this code: echo strip_tags(file_get_contents("http://www.sportinglife.com/football/live/vidiprinter")); Thank you.
-
Hi, I have a few wordpress websites that I host for my clients because of the number of attacks they have been receiving lately I have implemented a .htaccess file to block any ip address that's not in the whitelist, the problem I face is everytime the client moves from location to location or there ip address changes I have to update the .htaccess file with there new ip. I'm trying to build a script where they can access a url with a key in and submit there new ip address the php script would then read the .htaccess and add the new ip, however the 'echos' in the file seem not to be echoing any information to screen and I'm faced with a blank white screen can anyone give me any ideas on how to do this or have alook at the script below I have wrote. <?php if (isset($_GET('key')) && $_GET('key') = '78J89ke93k93HJ883j003') { $htaccess = '.htaccess'; //read the entire file $str = file_get_contents($htaccess); //delete deny from all from file $str = str_replace('deny from all', '', $str); $ip = 'allow from ' . $_get('ip'); //'allow from 92.27.111.112'; $str .= $ip; //re add deny from all to end of file $str .= "\n" . 'deny from all'; if(file_put_contents($htaccess, $str)){ echo 'IP ' . $ip . ' Added to .htaccess file'; } } else { echo 'Invalid Key'; } ?>
-
I have two domains - http://domaina.com, http://domainb.com I'm calling domainb.com's url from domaina.com: file_get_contents('http://domainb.com/a.php'); In http://domainb.com/a.php, I'm trying to creating a session or cookie for domainb.com <?php setcookie("key", "value", time()+3600); session_start(); $_session["key1"] = "value1"; ?> But this code is not working. Please help in solving this issue. Thank you.
- 2 replies
-
- curl
- file_get_contents
-
(and 2 more)
Tagged with:
-
Hi, I am new to PHP. Usually I use file_get_contents to get the content of the URL. however somehow, I am unable to get content for below website. http://fullmovie-hd.com/jurassic-attack-hindi-dubbed-nowvideo/ I used http://onlinecurl.com/ website to look at the result of curl and the response header is HTTP/1.1 200 OK Server: nginx Date: Thu, 03 Sep 2015 02:37:29 GMT Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive X-Powered-By: PHP/5.4.35 Link: <http://fullmovie-hd.com/?p=42820>; rel=shortlink I have tried various different things like using curl, changing init header etc. but nothing worked. Can anyone please help? I am writing a scrapper for Kodi and it will help everyone as it will be free scrapper to use. Thanks in advance.