Extracting data from a website after a delayed time with PHP [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I would like to extract prices from Klipsch.com but the prices don't immediately load upon loading the site, they load after the website is fully loaded using JavaScript or some other script. For example, I'm trying to extract the price from the inside of this page from the inside of this element:
<span class="product-display-price ecommerce-element">$3,284.00</span>
I've tried using Simple HTML DOM Parser but there is no delay function. I would like to achieve this in PHP but languages like Ajax would work fine too.

The site loads item details from an external javascript file. Why don't you call that file instead?
http://product.shopatron.com/product/{product_id}.jsonp?apikey={your_api_key}&...
For example, http://www.klipsch.com/products/la-scala-ii-floorstanding-speaker calls:
http://product.shopatron.com/product/1000996.jsonp?api_key=5gsk5uyr&apiVer=2.4.4&jstVer=2.4.4&method=get&headers%5BAccept%5D=*%2F*&callback=jQuery17202970524297561483_1481065390010&_=1481065390234

Related

Get few rows from another site in PHP [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to get this url rows: https://robot.your-server.de/order/market/country/US with pagination with php and get it in my website.
Scraping is not the better thing to do, have you check if this site has an API?
If not, you can use fil_get_contents to load all the page content as a string. One you have all the HTML as a string, DomDocument can help you to navigate to the first row.
Because this is scrapping I'll not show code example.
See file_get_contents and DomDocument.

Navigate Website with PHP [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How can I navigate on a website, using php ? (I want with a local program to access a website and parse html pages, fill forms, click buttons and being redirected, etc.; as if PHP was a real guy). Yet, I use Ruby Mechanise but it's not sufficient.
Thanks
To interact with a website you would most likely use a javascript framework such as phantomjs or dalekjs. PHP is not made for DOM manipulation and interaction or page automation.

How to get codes from another page? (Basic PHP) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want something like Wordpress's system. I want to get header code from header.php so I will not have to edit all of the pages when I'm going to edit something.
You can never get the code because one the php page is render, it gets converted into HTML so you will always see html.
I understand, you need header component.
1)Create a file header.php (add navigation bar or logo or whatever you want).
2)Include it in other php files as include("header.php");
so all the pages will be using this one header.php file and you can modify it and the changes would get reflected all over the web app.

How to scrape ajax loaded division? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
The title says it all. Please give me some way for how to scrape AJAX loaded Division.
There is one website which has Product Grid Division. I want this division for scrap the data from it but the problem is when i get the page content data in another html page there is no product grid because it's loaded via AJAX after some time. For Scrapping i tried both Perl and CURL with PHP.
Thanks in advance.
From WWW::Mechanize::FAQ
Which modules work like Mechanize and have JavaScript support?
In no particular order: Gtk2::WebKit::Mechanize, Win32::IE::Mechanize,
WWW::Mechanize::Firefox, WWW::Scripter, WWW::Selenium
Also see: How do you scrape AJAX pages?
Using Selenium, e.g. through Selenium::Remote::Driver, you will be operating real browsers to access the site. Sites can be quite sensitive to subtle differences in browser behavior.

Using PHP to change HTML permanently [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want my client to be able to log into their website, fill out a form and then have that webpage permanently have whatever they put into that form. Is there a way to use php to take whatever is submitted in that form and replace the html content with it? Im new to php, which functions could I use? And is it possible for php to permanently change anything on a site? Im not terribly concerned with security
Start with wordpress and if you don't like it, then there are other content management systems out there. Google can help you find one too.
Wordpress site

Categories