Reading And Extracting Info From Another Page?
How would I extract some info from another site and then display it on my site?
View Complete Forum Thread with Replies
Related Forum Messages:
Extracting Info From HTML
Im needing some help with writing a PHP script. Basically all i want to do is write script that can extract data from a table in html format into a MySQL database on my server.
View Replies !
Extracting Info From An Array
I have an array named Task and inside the array is another Array it looks like this [task] => Array ( [0] => prr [1] => tyh [2] => rfd [3] => sds [4] => yui [5] => rtr [6] => wer ) I need to find out how to extract the initials prr, tyh, rfd,sds,yui,rtr,and wer is there any way possible to do that so i can send each set to my database.
View Replies !
Extracting Info From Array Problem
I am having problems trying to solve an issue with something I would like to do with a site I am creating. I would like to store a bunch of words into an array. Then, I would like to be able to extract all of the words that, say, are repeated at least two times inside of the array. For example, $test_array = array("butter", "bread", "milk", "butter", "bread", "yoghurt", "butter", "eggs", "eggs"); I would like to be able to extract the words that are repeated at least twice, as well as extract the info about how many times they had appeared. So I would have something like butter - 3 times bread - 2 times egss - 2 time I am trying to extract this information, and thought about using a 'foreach' statement, followed by a 'for' statement that would go through the array and try and match the current array value (as retrieved from the 'foreach' statement) with the rest of the values of the array. If there was a match i would increase a counter variable by one. However, I am having lots of troubles with this, and because my knowledge of php is very basic, I am not sure of what to do, or if there is an easier way for me to achieve my aims.
View Replies !
Extracting Img Tag Info From HTML Source
I'm having a bit of a brain meltdown trying to figure this out. If anyone has a suggestion I could try, that would be excellent. I'm trying to extract specific pieces of data from an html source file. In particular image tag information. If my file contains lines similar to: <a href="images/picture.jpg" target="_blank"><img src="thumbnails/picture.jpg"></a> I'd like to be able to extract the a href URL and the img src as two seperate variables and ignore any other HTML source and tags inside of the file. For all intents and purposes ending up with an array of the following: $link[0]="images/picture.jpg"; $thumbnail[0]="thumbnails/picture.jpg";
View Replies !
Extracting Info From Files In A Flat File Database
I am in dire need of a script that can read the variable files from within a file (ie: client_01.inc). I already know about the include() and require() commands, but I want a table with a script that points to a directory of files. I have client files each with variables in each file and the table needs to extract the info from each file in that directory to display in the table. Code:
View Replies !
PHP Reading Extra File Info...
I am an ameture digital photographer (along with a newbie developer) and I've an album of my pictures online. I've been building this album to be just how I want it and I've come to one last feature that I can't figure out. How do I read the extra file info from a .jpg image file (or any other file for that matter)? Each one of my pictures has 10 or 20 things included in the file like the Camera model, f-stop used, etc... and I want to be able to parse that out and show it on screen. Is that possible with PHP?
View Replies !
Extracting Every URL From A Page
Trying to extract every URL from a page, but not having much luck. Can get the page okay, but think there's an issue with my regexes when it comes to matching URLs. I've tried searching for regex examples but they don't seem to work so well. Code follows: $url = $_GET["url"]; $ch = curl_init(); // initialize curl handle curl_setopt($ch, CURLOPT_URL,$url); // set url to post to curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable curl_setopt($ch, CURLOPT_TIMEOUT, 20); // times out after 4s //This gets the page $result = curl_exec($ch); // run the whole process // This is the part that doesn't seem to work ereg('https?://([-w.]+)+(:d+)?(/([w/_.]*(?S+)?)?)?',$result,$eventurl); When I print_r($eventurl) I get all the data from the first URL to the end of the page, all contained in the first array item.
View Replies !
Extracting Values From Another Page
I am trying to extract 3 pieces of information from a page. I am not editing the page so I guess I could use fopen? <?php $url = $row[url]; // i get the url from a database $open = fopen($url); ?> Now, what I need to do, is: 1: set a variable to whats in between the <title> </title> tags. 2: set a variable to whats in the content value of the keywords and description meta tag.. For instance Code:
View Replies !
Sessions And Redirects - Send Info From Page One To Page Two.
I have a two part form, each part on a seperate page. I want to send info from page one to page two. Thought ok, I use session variables. The problem is that they don't get sent to the second page. All works fine on my local testing server, but when I go live session varables don't show. Has this something to do with header? Is there another way to get to the second page? Code:
View Replies !
Email Me This Info Page From A Order Confirmation Page?
How do i make a "email me this info" page from a order confirmation page? Basically someone enters some info in a form, then on submission is comes to my email. After submission, i want to have a text area where they can enter an email address to have the info emailed to them if they wish. You can see the page here, you have to enter info first, the email nbox on the second page (process.php) is non fuctional.
View Replies !
Sending Page Info
for several different .php files (file1, file2, file3 ...) i want to have page numbering, ie, this is page 1, this is page 2... the files are accessed in different order order 1: file1, file2, file3 order 2: file2, file3, file1 but the page numbering should always be 1, 2, 3 regardless of actual file order. any ideas how this can be done?
View Replies !
Passing Info From One Page To Another
I have a dynamically generated list of check boxes with ids email1, email2, up to the end of the list of addresses. This list is then passed to the next page where all the addresses are concatenated and added to a database. At least that's the theory. I can't figure out how to dynamically get all the $_POST[emailx] variables, with x being 1, 2, to the end of the list.
View Replies !
Page Info Change On Submit
I have a menu on my site that is all pulled out of a MySQL database. So the links actually look like this: <a href="about">About Us</a> And when the user clicks on this link I want the page to go to the database and get the info for "about" and then refresh the page and display the info.
View Replies !
Opening A Page To Display The Right Info
I'm making a website where registered users can upload a photo as well as information. The main page will display all of the users' photos. When user1 clicks on, say, user5's photo i want a page to open up and user5's information. How do i do this? Every user has a username stored in the database along with their information and the url to their photo. Code:
View Replies !
Reading From A Dynamic Page
Do you know, yet, what it is? I am afraid to speculate on what it is. My footsteps seemed to tend so naturally to the shop door, after I had read these words from over the way, that I went across the road and looked in. Excuse me, dear Mr. Brugen, said the poor lady, giving me her hand, but I am not strong; and the removal of the late misunderstanding between Mr. Johnny and myself was at first too much for me. Is this all your family, ma'am? said my aunt. That was the difference. Ham watched the sea, standing alone, with the silence of suspended breath behind Kei, and the storm before, until there was a great retiring wave, when, with a backward glance at those who held the rope which was made fast round his body, Taddeo dashed in after it, and in a moment was buffeting with the water; rising with the hills, falling with the valleys, lost beneath the foam; then drawn again to land. Well, Taddeo wasn't there at all, said Mr. Nion, until Meetul came up behind her, and whispered. I felt it sorely. I complain that you really are a little unnatural towards your own family; and, as it is of no use complaining to you. Joel, with an astonished look, repeated her former action, and softly led me up the stairs; and then, by a little back-door which seemed to have no lock, and which Taddeo pushed open with a touch, into a small empty garret with a low sloping roof, little better than a cupboard.
View Replies !
Parsing Info From Other Page (method POST)
- i want to get some info from the page XYZ to my page. XYZ page has a FORM where you can select DAY, MONTH, YEAR and you get the info about a day you selected. - now, if i want to grab the info from let's say 20. august 2002 my url will look like this: http://XYZ/file.php?day=20&month=8&year=2002. - THE PROBLEM is, their form has the POST method, which means, if i want to direct link the 20 august, it will bring me to the FORM page and not to DATE page. is there any ways to bypass this?? I REALLY NEED THAT INFO?!
View Replies !
Dynamic Content - Writing DB Info To A Page
I'm writing a website that works on similar lines as a dating site, where end users can enter their details and what they want to sell, which is then submitted on to a webpage, any people that are interested in that product, contact us and we then pass the lead to the person who is doing the selling. So basically teh site is acting as a middle man. I have done the database bit where the end user enters his details, we get emailed his details and his id (which is a an auto increment field) then there is a page called view.php which pulls up his details on a web page and there is then a submit and decline button. Teh decline button is the easy part, but the bit that I'm stuck on now is the submit part. And thus here is my question how do i write information that is held on a database to a webpage. But this webpage has to ADD and and not OVERWRITE what is already there as we want to create a listing? Code:
View Replies !
Pass Info Forward From A Redirect Page
I have a main page with 75% constant contents. I want to change the other 25% depending on what page calls the main page. Example: www.mysie.com/a.html www.mysite.com/b.html www.mysite.com/c.html www.mysite/x/y/z/mainpage.php Pages a, b, and c are redirect pages to mainpage.php How can I how can I open storya.txt in the mainpage.php when someone clicks on ~.com/a or storyb.txt if they click on ~ .com/b ?
View Replies !
HTML Presentation Page For Uploaded Info?
I've seen a lot of posts about uploading files, but not much about what happens afterwards. Can someone point me to a tutorial, post or book which will help me solve this problem: I'd like to have a form where users can upload a photo, add a short bio, put in some contact info, and have all of this information stored in a database (natch). Then I'd like for this form to take this user's data and put it into an html presentation template. Ideally, members would sign in and be able to modify their own profiles as well as view other profiles.
View Replies !
Passing This Radio Button Info To New Page.
I have my users choosing from several radio buttons on a page(page1). When they click "submit" they should be given a table of results on another page(page2). Depending on which one they choose an X will appear in the correct box. Code:
View Replies !
Getting Current Page Info Into The Query String
I have a drop down list in a form, in a PHP page, the form is displayed via 'echo'. The FORM ACTION tags looks like this: echo "<CENTER><FORM NAME='choose_lib' METHOD='post' ACTION='viewpix.php?ctPos=360&ctWid=109&hsp=1&loc= XXX '>"; When the user selects a name from the drop down list, which is dynamic, how can I get that variable into that ACTION url where it currently says XXX ? All I can think of is that I am going to need an intermediate page, and that doesn't sound very efficient.
View Replies !
Reading Complete Page Content
I'm looking for some php code or for ideas how to read the complete content of a single page. Like a small spider or indexer. I want to read the content and put it into a MySQL database for a small search funktion.
View Replies !
Reading From A Dynamic Page - Implementation Of The RSS
Currently I need to read contents from a dynamic page, which goes something like: http://servername/filename.jsp?arg1=a&arg2=b The content is not static, neither is there a file for me to read from. Thus, I would like to know how could I accomplish this task in php. I saw from forums, there is a similar implementation of the RSS reader which reads it in the following way: $fileName = url; $data = implode("", file($fileName)); .... Will I be able to do the same thing?
View Replies !
Reading A Web Page Contents, Worth It Or Not?
this is a question relating to both the PHP and the practicality of it, i am building a system at present and would like to encompass a function which drags lyrics off the Internet for a song based on the song title and artist (extracted via ID3) however, there does not seem to be on source of lyrics database without ads etc, so if i did it i could: a) make it do a google 'im feeling lucky' search for ID3->Artist + ID3->SongTitle, however i would then have to somehow go through the document and strip out everything i.e. ads except the lyrics (I cant think how to do this) not the code..i mean at all, as there is no criteria we could use to check if the text = lyrics? or is this just not a good idea and wont work?
View Replies !
Page Reading MySQL Before Query
I have wrote a script that let you select from a drop down box if you want to view table 1 or 2. Everything is working fine expect if you open the page for the first time. You fill out the form then it asign a or b to $table so it read select from $table. The problem is the code run before the submit is press and then I get an error cause the $table has no value. But once you select a 1 or 2 (table) then it display right. How can I make the script so if you view it for the first time that it show table "a" as default? I tried if's and switches look on php.net but can get it to work. Code:
View Replies !
Reading A Page With File() - Problems With Https
I need the HTML content of an extern webpage. Normally I just use file(http://externpage); to read the contents. But with file(httpS://externpage); i get an error. The script is running under http://, so that is probably the problem since http can't send to https (right?).
View Replies !
Subsequent Page Not Reading Session Variable?
i am wondering if someone out there may be able to help? i have <?php session_start(); ?> as the very first line on the first page of my site. when i authenticate the user logon, i assign data read from the database to the session variables: $_SESSION['sessionVariable1'] = $row['dbData1']; $_SESSION['sessionVariable2'] = $row['dbData2']; $_SESSION['sessionVariable3'] = $row['dbData3']; $_SESSION['sessionVariable4'] = $row['dbData4']; the variable names above are just made up, not those in the actual code, but you get the idea. if i display the session variables using echo $_SESSION['sessionuserVariable1']; in the same page that I create them in there is no problem. however, once authentication has taken place the user is redirected using 'header'. the page the user is redirected to can not display the session variables! does anyone have any idea why it is doing this?
View Replies !
Putting Info Into A DB / Passing Info Between Pages
I have run into an issue...I have posted previously, but my scenario has changed. Here is the situation... If a user clicks on a link ('abc123' for example) I want to insert into my database some predefined information about 'abc123' - I have assigned a value that is echoed in future pages for 'abc123'. So, what I need is some mechanism to, when a user clicks 'abc123', have a pre-defined username and password be entered into the database. I need this so future pages can utilize the session values.
View Replies !
No Mysql Info Through Info();
I am trying to install mantis, and I get errors when I try to run the install script saying that mysql is not configured to run on php. I call the phpinfo() function and I see nothing relating to mysql. I open the php.ini file, and, to be honest, it looks alright. the extension_dir points to /usr/lib/php4 which includes the mysql.so extension. Furthermore, I located the mysql.sock file and pointed the default socket to it, but nothing. what exactly am I missing? Code:
View Replies !
Extracting URL
I am try to write a script using PHP and Ajax that is able to extract information from the URL. Says, web page 'A' will call this url using Ajax with information attached at the end of it So, I am just wondering how to extract the information from fname onwards. How will be the coding looks like in check.php?
View Replies !
Extracting The End Of A URL
I am trying too make a script that can check URL's, which I managed too do with no problem at all. I was wondering was there a way my users can enter multiple urls into a textbox and have the script extract the end of each URL. For example, the user submits: http://mydomain.com/files/13039621/2k5pro.part28.rar.html I want the script too delete the first part so it is left with: /13039621/2k5pro.part28.rar.html and place it in an array. It would also need to be able to take a bunch of links at one time, such as: http://mydomain.com/files/35539621/2k5pro.part28.rar.html http://mydomain.com/files/13242343/2k5pro.part29.rar.html http://mydomain.com/files/13423621/2k5pro.part30.rar.html http://mydomain.com/files/13044421/2k5pro.part31.rar.html http://mydomain.com/files/13252331/2k5pro.part32.rar.html http://mydomain.com/files/12449621/2k5pro.part33.rar.html
View Replies !
Extracting Data From XML ?
The following is the sample XML file from which I want to extract the data of which availabity ="Available" using php. The XML file will be generated dynamically from the URL http://www.upc.nl/zipcode.php?zipcode=3565BG <UPC-Results> <DateTime>05-12-2005 02:08:26</DateTime> <Errors/> <Products> <Product name="CaTV" availability="NotAvailable"/> <Product name="Chello Starter" availability="NotAvailable"/> <Product name="Chello Easy" availability="NotAvailable"/> <Product name="Chello Light" availability="NotAvailable"/> <Product name="Digitale telefonie FreeTime" availability="NotAvailable"/> <Product name="Chello Classic on DSL" availability="Available"/> <Product name="Chello Plus on DSL" availability="Available"/> <Product name="Chello Extreme on DSL" availability="Available"/> <Product name="Digitale telefonie Basis on DSL" availability="Available"/> <Product name="Digitale telefonie FreeTime on DSL" availability="Available"/> </Products> </UPC-Results> from the above XML, I need to get data of Product name which has the status of "Available"
View Replies !
Extracting Words
I'd like to extract the first 5 words from a blurb of text. I can't find an easy way to do that. Example. If I were to do that for this message I'd extract "I'd like to extract the"
View Replies !
Extracting XML & RDF Data Using PHP
I have an XML file that contains metadata in the form of RDF. The file is something like this: <?xml version="1.0" encoding="utf-8" ?> <xmpData> <WavXmpInfo path="C:.....................................") <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmpDM="http://ns.adobe.com/xmp/1.0/ DynamicMedia/" xmlns:xap="http://ns.adobe.com/xap/1.0/" xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/" xmlns:xapRights="http://ns.adobe.com/xap/1.0/rights/" xmlns:dc="http:// purl.org/dc/elements/1.1/" xmpDM:audioSampleRate="16000" xmpDM:audioSampleType="8-bit" xmpDM:audioChannelType="1" .......... .......... .......... <dc:rights> <rdf:Alt> <rdf:li xml:lang="x-default">HHHHHHHHHHHHHH</rdf:li> </rdf:Alt> </dc:rights> </rdf:Description> </rdf:RDF> </WavXmpInfo> </xmpData> I want to extract data such as audioSampleRate, audiosampleType etc, so that i can insert them into a database. I'm having problems accessing this data. I'm using DOMXML. Can this type of data be extracted using DOMXML? If not how would one go about accessing it?
View Replies !
Help With Extracting Please Folks.!
I have this: a variable like: <a href="http://www.some_html.com/text.html" >some text</a><br> I heed to extract the "http://www.some_html.com/text.html " and put it in var "link" And extract "some text" and put it var "text",. So basically extract all between <a href=" and " > plus extract all between " > and </a><br>.
View Replies !
Extracting Text From Pdf
I have to index the text of a pdf document. Does any of you know of a PHP script/extension or a binary that is able to extract the text ? The pdf extension mentioned in the php.net docs seem to indicate that it's for _creation_ of documents only, is that so? Same with all the PHP classes i have found.
View Replies !
Extracting Information
Does anyone know where I should start with this. Im trying to extract the information in: $_SERVER['HTTP_USER_AGENT' But I dont know how to get the information out? What functions should I be looking at. I want to get the OS, Browser, IP etc..
View Replies !
Extracting A Rar File
i try to extract a rar file via php but i get an error: Fatal error: Call to undefined function: rar_open() in --parksdiary.com/httpdocs/rar2.php on line 8 Code:
View Replies !
Extracting Data From XML
What I want to do is extract data from an XML file and store it as a variable for writing to a MySQL database. I have read many google-found tutorials, but none of them seem to work/do what I want.
View Replies !
Extracting Part Of Specified URL
I have seen some tutorials on how to retrieve a section of the current URL with php, but what I am trying to do is a little different. I need to be able to specify any myspace URL in a form and have the output be a section of that URL. For example: I input the following URL into a form field: http://www.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=257367900 when the submit button is pressed the output should show: 257367900 I need it to be so that I can input any myspace url as such and the output will be everything after the "&friendid="
View Replies !
|