Im guessing its php cURL, but Whats the best way to make a loop to scrape the DOM for info from a webpage that uses id’s in the URL Query like (?ProductId=103) There is about 1200 pages. I need to find the innerHTML of the 9th span on each page. This info will just get stored in a mySQL table
Tag: php
I need to debug PHP. What is my best choice?
I’m working on a web site under a Linux environment (Debian). I’m not an expert at Linux but I can handle it, and the website is made using PHP, MySQL, HTML, etc. The thing is, I’m using PHP for the server side. Right now, for testing, I installed Apache on my PC so I can test everything. But, it would
PHP passing $_GET in the Linux command prompt
Say we usually it access via How do we execute the same on a Linux command prompt? But what about passing the $_GET variables? Maybe something like php -e index.php –a 1 –b 2 –c 3? I doubt that’ll work. Answer Typically, for passing arguments to a command line script, you will use either the argv global variable or getopt:
how to read files with spaces and special characters in their name?
i have lots of videos in my server and i use the following code to get the duration of the video and it works fine.. But i could not get the duration for the files which has a space or any special characters like ( ‘ # % etc… I cant rename the files as it is stored already and
Taking website screenshot, server-side, on a Linux rented server, free
Ok so, right now I can’t really afford to pay for any service. I want to be able to take screenshots using my rented server, which is Linux based, and output them on the screen. I know there are a lot of services that do this, but they usually have limits or watermarks, or you have to wait for your
How to convert large SVG file to tiled PNGs?
I have a large SVG file (approx. 60 MB, 10000×10000 pixels but with the potential to get much larger), and I’m wanting to create, say, many tiled 256×256 PNG images from it (in that example there would be 1600 images; round(10000/256)^2). Does anyone have any idea of how to do this on a web server (running PHP amongst other things)?
Change the target of a symlink with PHP
How can I change the target of a symlink with PHP? Thanks. Answer You can delete the existing link using unlink function and recreate the link to the new target using the symlink function. You need to do error checking for each of these.
Postgres pg_dump dumps database in a different order every time
I am writing a PHP script (which also uses linux bash commands) which will run through test cases by doing the following: I am using a PostgreSQL database (8.4.2)… 1.) Create a DB 2.) Modify the DB 3.) Store a database dump of the DB (pg_dump) 4.) Do regression testing by doing steps 1.) and 2.), and then take another
yum install php-pear* on centos
I’m trying to install pear on my centos. I’ve used “*yum install php-pear**” to install pear and it seemed to install with success. No errors. I restart my server. However when I check out phpinfo(). I see that my php is still built using “–without-pear”. Isn’t yum supposed to rebuild my php with pear? What would be possibly going wrong?
UTF-8 all the way through
I’m setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I’m aware that I need to configure Apache, MySQL, and PHP to do