Jump to content

filoaman

Members
  • Posts

    41
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

filoaman's Achievements

Member

Member (2/5)

0

Reputation

  1. @ mac_gyver Thank you for your answer. Everything is clear now...
  2. I'm referring to WEB BROWSER!!!!!!! I have a small script on my server (on the internet - on the cloud) and i'm trying to run the script from a WEB BROWSER!
  3. Thank you for your answers. @requinix No. I try to check the file size and i get error: "filesize(): stat failed" I try to run a script on my server from a browser, so maybe the problem is what i thought in the first place. I read somewhere that browsers block the access on local files, when you try to access them from a remote server (the internet) @gizmola As i mention above i try to run the script located on my internet server via a browser. I don't run the script on my computer so the source you mention in not relevant in my case.
  4. I try forward slashes with no success. here is line of code where i get the error ftp_put($ftp_conn,'fileNameOnServer.txt', 'D:/directory/fileName.txt', FTP_ASCII );
  5. Hi. I'm trying to create a small script for personal use. The scope is to upload automatically a certain txt file from my PC hard drive to my server (in a certain directory) every time the script is running. I try different ways (ftp upload using "ftp_put" command, trying to "get_file_contents", etc.) but i always have the same problem: the error i get is that "No such file or directory". This error is about the file on my local PC hard drive. I know that most browser for security reasons doesn't allow access to files from local PC hard drive. Is this the reason i fail miserably or there is a mistake when a declare the local (PC hard drive) path. Until now i try: c:\directory\subdurectory\filename.txt c:/directory/subdurectory/filename.txt file:///c:\directory\subdurectory\filename.txt file:///c:/directory/subdurectory/filename.txt every time without succes. Any ideas? Thank you in advance
  6. Hi Ch0cu3r Thank you for the interest Since i'm not an experince coder, the only way to handle and modify the original text, in arrange all his elemnts on an array. After your help yesterday, now my script works perfect and i'm able to do every modification i want! I just wonder if there was a way to add this "icing on the cake" for aesthetic reasons. In any case this is a script for personal use and if what i'm looking for is complex, or impossible i can live without this... For a moment i thougth to replace the "\n" of text with an html code spipet (something like "<br />") but every trick i try doesn't work...
  7. Hello coders I have a text in a file in my server, it looks like this: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam congue quam dui, id pulvinar lacus congue et. Cras ac sollicitudin leo. Vestibulum et quam at dui imperdiet suscipit. Sed varius, lacus ac mattis finibus, lorem odio volutpat nibh, iaculis elementum tellus enim in quam. Duis eget magna et justo congue molestie. Pellentesque sit amet convallis erat. Ut dapibus ante lobortis fringilla porttitor. Mauris tincidunt tristique accumsan. Vivamus a vehicula ligula. Vivamus vestibulum tincidunt quam ornare gravida. Mauris suscipit ultrices viverra. Proin sed gravida nibh. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam erat volutpat. I can extract every element of the text and assign it to an array, in order to reconstrut the text lates as it is. The only thing i can't extract is the line brake. Is there a way to extract line brakes from the text and add them to my array? Thank you in advance
  8. Yes it works fine now even with UTF8 characters! Thank you Ch0cu3r, i was on dead end...
  9. Yes it works fine. Thank you Ch0cu3r The problem is that many of the strings i'd like to explode contain UTF-8 characters and in this case doesn't work correctly. If i try, for example to explode a string like this $string="This is, the text of my Investigação String!!! Contain ocasião numbers like 200 and other items like %."; doesn't work correctly. I search for a solution and the only one i can find was to add a (*UTF8) before the regex, but unfortunately without succes... Any ideas?
  10. Hi coders I have a string contain simple text, numbers and "special characters" (e.g. commas, points, quotes etc.) $string="This is, the text of my String!!! Contain numbers like 200 and other items like %."; What i'd like to do is explode in array like this $elements=array('This', 'is', ''', 'the', 'text', 'of', 'my', 'String','!', '!, '!', 'Contain', 'numbers', 'like', '200', 'and', 'other', 'items', 'like', '%', '.'); I try several methods and i explode some of the elemnts like whole words, or words and numbes but i'm unable to find a way to explode the "special characters' the way i like. Any ideas? Thank you in advance
  11. That would be great! Thank you for your interest
  12. Thank you for your answer jazzman1. I already read about cron in other threads of this forum (also in other sources) but i'm not familiar with this and i have to spend sometime learn more about it. For now, finally i have the a solution (complicate but stable) and everything works OK. My script run more than 48 hours without problem, i get the result i want and the webmaster of the remote server happy (i hope so...0) since the script doesn't visit the server more than 25 times every 15 minutes.
  13. Did i mention somewhere that i plan to thief data? How did you conclude that?
  14. Nothing fancy... There is a website where 600 pages (almost) constantly change. There is no API and i need to collect data from this 600 web pages at least 4 times every day in order to feed with data my application. I don't like the idea to scrape the data at once (my script can do that in a few seconds...) since the remote web site will ban my IP I prefer to scrape the data in a slower way. So i'm looking for a way to pause my script for at least 2-5 minutes after scrape data from 25-50 pages. This way i hope to avoid the IP ban from remote site. I already find a way using "set_time_limit" function, but until now my script is not very stable and some times i get errors and i have to restart the script manually.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.