2,599 questions
0
votes
1
answer
42
views
Parsing dynamically loaded HTML with PHP [closed]
I am trying to parse data from a web url. However, the URL in question appears to load content dynamically on load in a browser.
I have tried a couple of things so far:
$dom = new DOMDocument;
$dom-&...
0
votes
0
answers
106
views
Got error - failed to open stream: no suitable wrapper could be found
Other similar posts did not fix this error.
Using Codeigniter and Openai API to generate images.
Started getting this error after server migration.
Now it just places 0 byte img file on the server and ...
0
votes
0
answers
91
views
Correct way to sanitize and secure file_get_contents('php://input')
Lets say you have a front end app sending reqiests to a php backend.
On the front end:
fetch("/", {
method: "POST",
body: JSON.stringify({
"data": myData,
...
-3
votes
1
answer
34
views
error filed to open file, permission denied [duplicate]
i try to open users.json file but not in my index.php file
i used requard function your and that the result:
file_get_contents(C:\\XAMPP\\htdocs...): Failed to open stream: Permission denied in...
...
0
votes
0
answers
71
views
file_get_contents() request fails online (but not in localhost)
I have a code that worked on my website just fine until now and I can't find why. However the code still works in localhost. It's a file_get_contents() request to download a PDF file from another ...
0
votes
2
answers
134
views
Read XML feed with PHP [closed]
I have a problem with I trying to read and parse this feed:
Some XML Feed
for some reason the function SimpleXMLElement returns empty nodes. I am using file_get_contents to read the URL and then ...
0
votes
1
answer
155
views
What is in file_get_contents('php://input') when applied to an html form
I have a general question regarding file_get_contents('php://input'). When this code applies to a <form> that is submitted for processing, what is actually returned?
This is in regards to some ...
0
votes
1
answer
77
views
PHP file_get_contents how to get <pre> content
I am trying to work with an API to get some public company data.
An example API URL is the following: https://www.kbo.party/api/v1/enterprise/825386460
As you can see, at the bottom of the page there ...
0
votes
0
answers
104
views
PHP file_get_contents giving out of memory issue for more than 20 MB pdf files
ini_set('memory_limit', '-1');
ini_set('post_max_size','-1');
ini_set('upload_max_filesize','-1');
ini_set('max_execution_time','0');
set_time_limit(0);
$files = file_get_contents($_FILES['file']['...
1
vote
3
answers
483
views
For some reason file_get_contents stopped working from one day to another and returns a "HTTP/1.1 406 Not Acceptable" error in PHP 7.2.34
THE PROBLEM
I am mantaining a webpage that's running in a server hosted by Inmotion and using PHP 7.2.34. Let's call it "https://company-website.net/"
Inside this page we need to read a JSON ...
0
votes
1
answer
193
views
file_get_contents and redirect
Using file_get_contents I get the wrong page. I am sending a request with a header to the page https://soccer365.ru/games/1906341 /, and I get https://soccer365.ru/games/1906388/
How do I get exactly ...
0
votes
0
answers
170
views
Web server on Linux with php 7.4 fails on file_get_contents() for 1 URL only
I have problem using file_get_contents() for 1 particular URL only. I have full access to both the source and fetching server.
The following ARE set:
On getting server
allow_url_fopen = On
On source ...
0
votes
1
answer
54
views
I'm using the screendot API, but the screenshot is not output
php
<?php
$opts = [
"http" => [
"method" => "GET",
"header" => "Authorization: Describe api here"
]
];
$context =...
0
votes
1
answer
50
views
how to get data in HTML using PHP?
there is a currency conversion site at the following address:
https://www.tgju.org/currency
How can I buy prices like dollars and...?
I have a sample code that finds only one specific class using &...
1
vote
1
answer
273
views
Error in Fedex Rates API Implementation in PHP
I've following code in PHP for "Fedex Rates and Transit Times API" using file_get_contents() function.
I'm using valid access token value and valid account ID and it is working fine in ...