Skip to main content

All Questions

0 votes
0 answers
489 views

jQuery POST query to my php backend file returns error 502: Bad Gateway if the response is too long

I'm writting some code to retrieve some json from a website. To avoid CORS, I am triggering the GET from my php file using file_get_contents. The query is successful and the data is sent back. However,...
user1530476's user avatar
0 votes
2 answers
316 views

Load Html content into jQuery variable

I am trying below code to load html content to jquery variable. <html> <body> <div id="static-content"></div> <?php $static_content = ...
Jafar Pinjar's user avatar
0 votes
1 answer
1k views

AJAX Request fails because of file_get_contents

I'm doing a fun project by myself, which involves getting the HTML source from another web (from a different domain) and getting some info of it. In my first steps I just made everything in PHP which ...
DrDomingas's user avatar
0 votes
1 answer
1k views

Google drive api file_get_contents and refferer

I am trying to list files from google drive folder. If I use jquery I can successfully get my results: var url = "https://www.googleapis.com/drive/v3/files?q='" + FOLDER_ID + "'+in+parents&key="...
Toniq's user avatar
  • 4,988
2 votes
1 answer
4k views

jQuery using AJAX to display PDF data obtained from a PHP file

I am trying to use AJAX to query a PHP file and display a PDF file to the user. The response from the PHP file is the raw data of a PDF file stored on my server. Below is the code I am using to try ...
Austin's user avatar
  • 1,627
1 vote
0 answers
334 views

file_get_contents not showing hidden <span> content from external site - PHP

Here is the list of some duration code from the external source site: Duration: <span class="time" id="d_0VNh3WVICjw">4:32</span> Duration: <span class="time" id="d_Neu9kCYlxyU">5:...
Dilip Kumar's user avatar
-1 votes
2 answers
88 views

PHP how to set content later or if is loaded? [closed]

Hello I have a website which loads data from an api to show the newest stats. I am storing it for 10 minutes to prevent loading api calls every time. Since there are many api calls it takes at first ...
MaZy's user avatar
  • 91
0 votes
1 answer
59 views

Get remote page complete contents and display at site

I simply want to load above page's complete contents and display using php. I tried below method but it did not work. $url = "http://www.officialcerts.com/exams.asp?examcode=101"; $curl = curl_init($...
S Nazia's user avatar
0 votes
1 answer
178 views

get content from other page generated by javascript

I got a situation where I want to get the content from another page which generates an image dynamicly by its parameters. So for example I do got test.php?u=user1&type=test. Opening this page ...
Jordy's user avatar
  • 85
0 votes
1 answer
1k views

PHP file_get_contents to get jquery min code

I am writing a script that will go through all my .js files and minify them into one .php file to be included on the site. I just run this script after I have edited some js and want to upload it to ...
MicWit's user avatar
  • 685
0 votes
3 answers
1k views

Download javascript output using file_get_content

Is it possible to download the resulting HTML code after the JavaScript code on the page has been run using PHP. For example, when the page has this jQuery code $("p").html("Hello world"); and I use ...
Aðalsteinn Leifsson's user avatar
0 votes
1 answer
186 views

how to find element in html using php?

I am trying to find an element in html document using php. include_once('simple_html_dom.php'); $handle = fopen("exercise/Exercise.php", "r"); $file = fread($handle ,8192); ...
vaibhavcool20's user avatar
1 vote
0 answers
1k views

fastest way to get data from url

I want to read the data from Linkedin URL, like https://www.linkedin.com/countserv/count/share?url=https://stackoverflow.com/&format=json I have a few methods to do, but I can't find the right/...
KlaasVaak's user avatar
0 votes
2 answers
4k views

How to get content of div ( from external url) without loading the whole website

I'm trying to get the content of a div from an external url, but i don't want to load the whole website. Because i have to load a lot of data from many websites and it has to be very fast... Thank ...
josser1995's user avatar
0 votes
1 answer
56 views

Echo strings when page is still downloading

Im trying to make a PHP downloader. echo '<p>Downloading New Update</p>'; $newUpdate = file_get_contents('http://your-server.com/update.zip'); echo 'Done downloading'; When I run the ...
Tom Groot's user avatar
  • 1,180

15 30 50 per page