Jump to content

buraisu

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

buraisu's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [code]preg_split('/%\w+\^|, |\$\'?|\^|\?\s*(;|%)|=|\s{5,}|\s+\?/', $string);[/code] Would someone be able to tell me exactly what all the \^|\ and such means? I know what the preg_split function does, but I dont know what all the other stuff means? Thanks
  2. [code]preg_split('/%\w+\^|, |\$\'?|\^|\?\s*(;|%)|=|\s{5,}|\s+\?/', $string);[/code] Would someone be able to tell me exactly what all the \^|\ and such means? I know what the preg_split function does, but I dont know what all the other stuff means? Thanks
  3. Hi there. I am just wondering how I would be able to seperate something using preg_split I have str1 and str2 stored in a variable like this str1 BC str2 Anyone have any idea how I would seperate those?
  4. [quote author=Nicklas link=topic=114332.msg466968#msg466968 date=1163364629] This should do the trick! ;) [code=php:0]preg_match_all('/\w+/', $string, $matches); print_r($array);[/code] Gives me this: [code] Array (     [0] => BCABBOTSFORD     [1] => KLINGON     [2] => LUCY     [3] => JORDAN     [4] => 39994     [5] => EPSON     [6] => PL     [7] => ABBOTSFORD     [8] => BC     [9] => V3E     [10] => 1L4     [11] => 6360287906496     [12] => 100819880801     [13] => 0AV3G1J4     [14] => M168     [15] => 54BRNHAZ     [16] => U8     [17] => R     [18] => 690 )[/code] [/quote] Thanks for the help, but that isnt quite what I need. I need to have the addresses more like this [4] => 39994 EPSON PL [5] => ABBOTSFORD [6] => BC [7] => V3E 1L4 The addresses are listed like this 39994 EPSON PL$ABBOTSFORD BC  V3E 1L4^ Splitting things with spaces wont work, becuase there are sometimes streets/cities with more than one word. maybe you could store everything before the $ in one array, and then everything between the $ and the BC in one array. and then everything after the BC and before the ^ in another one. Can that be done? Thanks alot for any help
  5. [quote author=doni49 link=topic=114332.msg466877#msg466877 date=1163346093] BC is the Province right (sorry I'm in the U.S. don't know Canadanian Geography all that well). Are province abbreviations all two letters?  How many are there?  Maybe you could use an array of Provincial abbreviations to search the City Province Zip line of the array for the Province.  Every thing on the left side of the Province is City and everything on the right side is zip. Are all Canadian driver's licenses the same?  They ALL store the same info the same way?  [/quote] I only need to worry about BC drivers licenses. As the other provinces do not all even have magnetci strips on them, and the data is stored differently on the ones that do.
  6. Ok, regex is beyond my php scope. but hopefully somone else can help me some more. The above code worked perfect for the one scanned drivers liscence, but when I tried others I got some errors. Here are some more examples [quote] %BCSURREY^DESMOCKIS, JOHN$WILLIAM^12549 164 ST$SURREY BC  V6R 4J9^? ;6360288190379=080919880720=? %0AV3R4J8                     M173 89BRNBRN                          MW$'X$51   ? %BCPLURAL RIVER^BOND, BRYCE ANDREW^7431 NUTA CR$PLURAL RIVER BC  V9A 535^? ;6360287655941=070519880901=? %0AV8A5J5                     M191 82BRNBRN                          'R++S4933  ? %BCABBOTSFORD^KLINGON, LUCY JORDAN^39994 EPSON PL$ABBOTSFORD BC  V3E 1L4^? ;6360287906496=100819880801=? %0AV3G1J4                     M168 54BRNHAZ                          U8()R"690  ? [/quote]I think the problem is that it was never taken into consideration that there are town with more than one work, and people may have first/last/middle names that also have more than one word. thanks for any help
  7. Does anyone know how I would be able to break this [5] => SURREY BC  V6R 4K8 into 3 parts Surrey, BC, and the postal code?
  8. omg. thanks. I dont know regular expressions yet. I should learn them!
  9. Hi there. I am trying to whip something up for the store I work at. Basically what needs to happen is a customers driver liscence will be scanned and the data stored on the card needs to be automatically filled into a database. This is the data scanned from a card (edited for privacy.) %BCSURREY^LASTNAME, FIRSTNAME$MIDDLENAME^12345 154 ST$SURREY BC  V6R 4K8^? ;6360288190379=080919880720=? %0AV3R4J8                    M173 89BRNBRN                          MW$'X$51  ? I have it so that when the card is swiped the info is sent in a string variable to my php script. So I have $_POST['cardinfo'] which has all that data in it. now what I dont know how to do is get the data from in that variable seperated into seperate variables (or into arrays) for the first name, last name, address, etc... Anyone have an idea how I could do this?
  10. I wrote this script using the curl information I read up on. but it doesnt really work. Is it becuase I am using the loop? can this even be done how I am trying to do it or must I do it another way? [code] <?php include 'db.php'; $query = 'SELECT url FROM proxies'; $result = mysql_query($query); $ii = mysql_num_rows($result); $i=0; while ($i < $ii) { $prox = mysql_result($result,$i,"url"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://targeturl"); curl_setopt($ch, CURLOPT_PROXY, "$prox"); curl_exec($ch); curl_close($ch); $i++; } ?> [/code]
  11. Here is a better description of what I need to do. In a loop. Connect to proxy server pulled from a database, give the webpage a hit repeate for other proxy servers. It shouldn't be a big task, unless it is a difficult process (if it is even possible) to do the proxy server stuff.
  12. I can do it if I manually change my proxy settings no problem. but that is rather annoying. I am just connecting to the page with a different IP address, therefore they think I am a different browser. I just want to be able to automate this process with PHP.
  13. Well, this may sound lame, but if I can find a way to get my friends nexopia profile hitcount up by a certain amount I am oing to get 50$. I know that a hit is added for every different ip address that visits the page, once a day. So I am trying to make a script that will connect to different proxy servers in a databse and give the page a hit.
  14. Hi there. Is it possible to connect to a site (lets say we are using fopen) but connect thorugh a proxy server. Can this be done all in php?
×
×
  • 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.