Search Results

Search found 3 results on 1 pages for 'user331071'.

Page 1/1 | 1 

  • extract a specific part from a html document , php cURL , php, preg_match

    - by user331071
    Hello ! I'm trying to extract some information from a webpage using php cURL+preg_match or any other function but for some reasons it doesn't work at all . For example from this page http://www.foxtons.co.uk/search?location_ids=1001-29&property_id=712128&search_form=map&search_type=LL&submit_type=search I want to extract the title which is "4 bed house to rent, Caroline Place, Bayswater, W2", the price which is "2,300" and the description which starts at "This fantastic..." and ends at "(Circle and District Lines). " I tried to use php cURL + dom but I'm getting a lot of errors like this "htmlParseEntityRef: expecting ';' in Entity, line: 243" and no result displayed Also I tried to use preg_match or preg_match_all but doesn't work either . A very basic example would be highly appreciated ! thank you !

    Read the article

  • php str_replace pattern

    - by user331071
    Hello , I have a php application that saves the pictures on the server and also stores the picture names in the database . The issue that I have is that the picture names include the path/folder where it was saved from (e.g 1220368812/chpk2198933_large-2.jpg) so I need a str_replace pattern to remove "1220368812/" and have the picture name correct stored in the db . Also I would appreciate if you will send me a good link that explains how exactly the str_replace patterns work or at least how the pattern that you use work .

    Read the article

  • curl post picture multipart/form-data, php cURL need help!

    - by user331071
    I'm trying to upload a picture to a specific website using php cURL but I don't really understand what parameters do I need to send because the data looks a bit weird . Here is what i got with the http analyzer Type : multipart/form-data; boundary=---------------------------182983931283 -----------------------------182983931283 Content-Disposition: form-data; name="file"; filename="Blue hills.jpg" Content-Type: image/jpeg Here appears the souce of the image itself like "ÿØÿàÿØÿàÿØÿàÿØÿàÿØÿàÿØÿà" -----------------------------182983931283 Content-Disposition: form-data; name="action" images -----------------------------182983931283 Content-Disposition: form-data; name="anonymous_email" Y -----------------------------182983931283 Content-Disposition: form-data; name="site_id" 1 -----------------------------182983931283 and so on other parameters. The issue that I have is that I don't understand what is the boundary, where do I get it from (because it doesn't appear in the html document that generates the POST and how should I make the post . If you would give me a simple example to post the above parameters to http://example.com I will definitely get the trick . Currently I'm using the following function to make the post : function processPicturesPage($title, $price, $numbedrooms, $description) { //Set the login parameters and initiate the Login process $fields = array( "changedImages" = "", "site_id" = "1", "posting_id" = "", "current_live_date" = "", "images_loaded" = "", "image_actions" = "", "title" = $title, ); foreach($fields as $key=$value) { $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string,'&'); $URL = "http://www.example.com/cgi-bin/add_posting.pl"; return $this-processCurlrequest($URL, count($fields), $fields_string); } and in the processCurlrequest I have the curl options (cookies etc) and url .

    Read the article

1