How to creat an auto-advance feature with PHP/XML [closed] - php

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I know how to read and parse XML with PHP, but is there a way to make it auto advance through pages of XML data automatically? I work for a TV station that is featuring open houses via a real estate xml feed and need to show one or two houses at a time for a half hour without requiring someone to sit there and advance the pages themselves. Any thoughts would be appreciated!

You could have PHP output the necessary JavaScript to redirect to the next page.
Here's how to redirect to a new page: How can I make a redirect page in jQuery/JavaScript? combine that with setTimeout() to add a delay.
I'm not sure whether I would rely on this for a live TV feed, though - I'd be too scared of the embarrassment of the browser crashing, or an error popping up....

Related

Scraping data which loaded after scrolling to bottom [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 5 years ago.
Improve this question
I'm working with PHP and I want to scrape some data from any website. But I have a problem. I scrape data but these items number are 48. But I know that page has 11K items. Rest of datas extend when you scroll and you get new bunch of datas (48 items).
I'm scraping with simple_html_dom. How can I manipulate scroll and get data ?
Thanks! :)
Sounds like the missing data is loaded via ajax.
Check the Network tab in the Developer Console (by pressing F12). Take a look at the URL which is being called (and the response), and edit it to your needs. Then call this URL instead of the one you are taking now.
It is impossible by this way.
But if you need to scrap this data you can send requests to endpoints which return lazily loaded data. You must research js code of target site.
p.s.
If you want to use really hard approach, you can research browser emulating.

How to track users on my website? [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 5 years ago.
Improve this question
so I have a shopify website. And shopify sometimes give me a visitor log kind of like this:
"A user from has visited your website,
First page visited: homepage (22 seconds)
About us (1 minute)
Product page (2 minutes)"
I was wondering how I would go about creating something similar to this in php/js.
Thanks in advance!
You can instead use Google Analytics, it has in depth analytics on visitors. Its just about embedding JS code in your page and you're good to go. If you build your own code in any language, I'm pretty sure you will end up writing tonnes of codes.
To answer your question,
1.Create a web socket connection from your page to backend.
2.Pass event codes like clicks, refresh, session ids etc on user actions. Your JS can fire them up with an active web socket connection. It is pretty much light weight.
To store this information, I would suggest to use NoSql.
Hope this helps!

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.

Extracting data from other websites (not illegal) [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 am creating a football transfer site and i want to know how to extract particular pieces of data from a site and insert it into mine. For example, this site : http://www.footballtransferleague.co.uk/football_rumours.aspx , shows you transfer rumours and I want to insert them into my site however they update every 24 hours so I want the new data to appear on my site aswell.
Im not asking for any code, just some tips or videos that can be used to learn about this.
Before anyone says this is illegal, football rumours are considered as 'facts' hence available to reuse.
thanks in advance !
Try with this tool. It downloads the pages with the code that is only translated like html, js and sometimes php. i don't know if it works with .asp .aspx.
htttrack

Multiple Blog Feed [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I hope you're having an awesome day.
Today I wanted to implement a blog on my site, write it on bloggr and when I post it, feed it to mysite.com/index.html What would I need to be able to accomplish this! Help would be greatly appreciated!
I was searching around blogger and ended up in a configuration of it,
1st. I get asked for my domain.
Then I have to replace the CNAMES...
-the blog just redirects to my domain with bloggr style...I want the blog to be displayed on one blog.mydomain.com/post-youre-watching
I also want a div with the feed of the last 3 entries(despite the author)...How can I accomplish this? You guys know anywhere where I could find information on how to do this? If so, what information(or language) do I need to learn?
If you want to present the content on your site (rather then making your hostname point to Blogger) then you'll need to actually put it on your site.
The simplest way would be to periodically pull the data from the Atom or RSS feed hosted by Blogger and store the content in a database on your server.
You can then query it with your own server side code to get whichever combinations of data you desire.

Categories