Add ads with 'x' php script

Discussion in 'Pre Sales Questions' started by ESVE, Sep 12, 2007.

Thread Status:
Not open for further replies.
  1. ESVE Guest

    I am looking for the following solution.
    My ads arrive through an SMS portal. This ad needs to be automatically added to the classified website, without human interference.
    What will happen is the following. As soon as an SMS arrives, a php script is initiated on my host. This php script will open a 'link' to the server, and this 'link' has all the ad info in it. So something like:
    http://somesite/add_ad.php?category=cars&password=axaxax&adtext=I sell my car
    This add_ad.php script must then create the ad in 68 classified, including some initial info like password, and ad expiry date etc.
    Can I configure 68 Classified in such a way that what I need is possible ?

    The thing is I can develop a whole classified webscript from scratch, but better use one available and shape it to my needs. Does 68 Classified offer this.
    Oh, and other thing, the site is going to be in Spanish, so I need to translate all text to Spanish. That is possible no ?

    Greetings from Lima
  2. civ Customer

    Just write yourself a simple script to take the SMS messages and inject the pertinent info directly into the 68C database, bypassing the 68C script itself. Just let 68C handle the display of the already-posted ads.
  3. ESVE Guest

    Sure, that is exactly what I need. But is this feasible ? As I do not have bought the programm yet, I do not know how accessible all things are. Is an ad in the database nothing more than a row in a database with some fields. And is a user also nothing more than a field in another table ? In that case it could be feasible. If passwords are for example encrypted in a way that without having access to an encrypted 68 classified core, it is impossible to encrypt, then I could not simply inject it in the database.
    Thanks for your reply.

    Greetings

    ESVE
  4. Eric Barnes Guest

    Users are all stored in a one table where as listings are stored in one main table with seperate tables for the extra fields.

    The user's password is encrypted with one-way encryption so you can not get this information from the database. But you can compare it.
  5. forumosa Customer

    How can I insert an md5 password into new user's row in class_user

    I have a script that tries to take newly registered user's details from a phpBB3.0.2 user table and create a new account with it on my 68c installation (using 4.0.9). I described my situation back at phpBB.com (over here: phpBB • View topic - Almost got semi-manual integration of phpBB3 & 68classifieds) and confirmed:
    1. phpBB3 uses a salted hash encryption method that cannot be unhashed
    2. When a new user is created in phpBB, I can store an unencrypted password in a separate user table field for later use with 68c
    On a batched basis, I will use my script to simultaneously activate the phpBB3 user and create her 68c account. This will be done by pulling the unencrypted password from phpBB's user table and then encrypting it using the md5() function and inserting it into my 68c class_user table

    As my script activates all the phpBB users I've chosen, it loads an array of users to be inserted later into 68c. My unencrypted password field in phpbb_users will be in the 71st position, so I plan to use this to load the password array:
    Code:
    $c_password[$i] = $row[70];
    Does this approach make sense?
    Do you have any other suggestions? Or words of caution?
  6. Eric Barnes Guest

    I am not exactly sure how phpbb works now. But couldn't you just change our script to use their same hashing model. Then you wouldn't have to store the password and it would remain the same?
  7. forumosa Customer

    That didn't occur to me...

    You mean replace the md5() being used in 68c for the phhbb_hash() and phpbb_check_hash()? That does make sense, but it also seems more complicated

    Are there many files that I would have to change to replace, especially to check with entered passwords are true (which would use phpbb_check_hash)?
  8. forumosa Customer

    Got my answer!

    I got my answer back at the phpBB forum - although 'tech support' over there tends to get cranky (I shouldn't complain - after all, it's free support)

    Just sharing for those here who might be interested:
    Posted at phpBB • View topic - Almost got semi-manual integration of phpBB3 & 68classifieds
  9. forumosa Customer

    It works!

    Just want you to know that I got it working

    Now I need to remove the parts of the Account Home (like in useraccountmodify.php) that would allow my 68c users to change their email or password. I will replace these areas with reminders to do all their account changes back at my phpBB3 website
  10. Eric Barnes Guest

    Thanks for the follow up. Would you mind sharing the steps you had to take to get it working?

    A lot of people seem to ask about this.
Thread Status:
Not open for further replies.

Share This Page